October 23, 2015 at 3:27 pm
October 23, 2015 at 6:08 pm
One, not enough information to even write a query.
Two, based on the information provided this should be a relatively simple query to write.
You may want to read to the first article I have referenced below in my a signature block. It will show you what we need posted and how to post it to answer questions like this one.
October 24, 2015 at 3:50 pm
asafswis2 (10/23/2015)
i add the filei need help to build sql query as show in file
tnx all
Links to speadsheets just aren't going to cut it for readily consumable data. Please read and heed the article that Lynn pointed you to so that we might help you better. Thanks.
--Jeff Moden
Change is inevitable... Change for the better is not.
October 26, 2015 at 3:55 pm
In the future, actual SQL statements to create the tables and insert rows would be required. But, for this request, the code should do what you're trying to do, I think.
SELECT T1.*
FROM T1
INNER JOIN (
SELECT [Order No]
FROM T1
GROUP BY [Order No]
HAVING COUNT(DISTINCT [delivery date]) > 1
) AS orders_with_multi_deliv_dates ON orders_with_multi_deliv_dates.[Order No] = T1.[Order No]
SQL DBA,SQL Server MVP(07, 08, 09) "It's a dog-eat-dog world, and I'm wearing Milk-Bone underwear." "Norm", on "Cheers". Also from "Cheers", from "Carla": "You need to know 3 things about Tortelli men: Tortelli men draw women like flies; Tortelli men treat women like flies; Tortelli men's brains are in their flies".
October 27, 2015 at 6:23 pm
THANK YOU
Viewing 5 posts - 1 through 5 (of 5 total)
You must be logged in to reply to this topic. Login to reply