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 |
|
Lucy
Starting Member
4 Posts |
Posted - 2005-09-19 : 04:30:32
|
| Hi,Does anyone have some ideas on how to get around the limitation of NOT IN when using multiple columns.Basically, I would like to find out the difference between two tablesover several columns:select a, b, c from table1 wherea, b, c NOT in (select a, b, c from table2)Thank you,Lucy |
|
|
jen
Master Smack Fu Yak Hacker
4110 Posts |
Posted - 2005-09-19 : 04:33:17
|
| how about using join?--------------------keeping it simple... |
 |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2005-09-19 : 04:59:00
|
| Try thisselect a, b, c from table1 T1where not exists (select T2.a, T2.b, T2.c from table2 T2 where T1.a=T2.a and T1.b=T2.b and T1.c=T2.c)MadhivananFailing to plan is Planning to fail |
 |
|
|
Lucy
Starting Member
4 Posts |
Posted - 2005-09-19 : 18:36:42
|
| Hi All,Thanks a lot for the prompt replies.I've implemented my query using join as advisedand it works as expected.Lucy |
 |
|
|
|
|
|
|
|