Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
david_m
Starting Member
6 Posts |
Posted - 2012-09-27 : 09:14:27
|
Hi All,My sales manager has requested a report, which in theory I can understand, but the practicalities of it are not working correctly.I need to create a report that gives me a list of customers who havent bought a particular product code.Is it possible to report on something where the other half of the data doesn't exist!! |
|
webfred
Master Smack Fu Yak Hacker
8781 Posts |
Posted - 2012-09-27 : 09:32:33
|
Yes.We need to know the involved tables (tablestructure and data types) and some sample data. Too old to Rock'n'Roll too young to die. |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2012-09-27 : 10:47:05
|
yep..its possibleusing LEFT JOIN ,NOT EXISTS etc you can retrive data that doesnt exist on other tablebut for suggesting query we need table details with some sample data------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/ |
|
|
webfred
Master Smack Fu Yak Hacker
8781 Posts |
Posted - 2012-09-27 : 10:50:01
|
quote: Originally posted by visakh16 yep..its possibleusing LEFT JOIN ,NOT EXISTS etc you can retrive data that doesnt exist on other tablebut for suggesting query we need table details with some sample data------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/
you don't say... Too old to Rock'n'Roll too young to die. |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2012-09-27 : 11:12:08
|
quote: Originally posted by webfred
quote: Originally posted by visakh16 yep..its possibleusing LEFT JOIN ,NOT EXISTS etc you can retrive data that doesnt exist on other tablebut for suggesting query we need table details with some sample data------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/
you don't say... Too old to Rock'n'Roll too young to die.
sorry didnt get you?dont say what?------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/ |
|
|
webfred
Master Smack Fu Yak Hacker
8781 Posts |
Posted - 2012-09-27 : 14:53:28
|
quote: Originally posted by visakh16
quote: Originally posted by webfred
quote: Originally posted by visakh16 yep..its possibleusing LEFT JOIN ,NOT EXISTS etc you can retrive data that doesnt exist on other tablebut for suggesting query we need table details with some sample data------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/
you don't say... Too old to Rock'n'Roll too young to die.
sorry didnt get you?dont say what?------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/
priceless I'm just kidding Too old to Rock'n'Roll too young to die. |
|
|
|
|
|