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 |
peace
Constraint Violating Yak Guru
420 Posts |
Posted - 2013-08-30 : 03:27:46
|
how can i exclude all id which doesn't purchase any code.codeA,codeB,codeC,codeD,.....ID 1 purchase codeA, this will not be pulled out.ID 2 didnt purchase any code, this will be pulled out.I tried select id,code from tableA where code not in ('codeA','codeB','codeC','codeD',...)but it still pull out ID 1. |
|
bandi
Master Smack Fu Yak Hacker
2242 Posts |
Posted - 2013-08-30 : 05:35:53
|
Can you elaborate the requirement with sample data and output?post us back the table structure, sample data in the table and expected output...--Chandu |
 |
|
|
|
|