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 |
|
Stephanie Baroux
Starting Member
3 Posts |
Posted - 2004-07-13 : 09:13:34
|
| Hello I try to run the following query:SELECT id1,id2from t1, t2where t1.id1 *= t2.id2and t2.id2 is NULL;The last criteria "t2.id2 is null" doesn't work.Details of data:SELECT id1,id2from t1, t2where t1.id1 *= t2.id2Result> t1 t2 111 111 222 NULL 333 333 444 444 555 NULLSELECT id1,id2from t1, t2where t1.id1 *= t2.id2and t2.id2 is null;Result> t1 t2 111 NULL 222 NULL 333 NULL 444 NULL 555 NULLResult expected:> t1 t2 222 NULL 555 NULLIf somebody can help me to gix this query, it would be very helpfulThanksStephanie |
|
|
Seventhnight
Master Smack Fu Yak Hacker
2878 Posts |
Posted - 2004-07-13 : 09:15:03
|
| SELECT id1,id2from t1Left Join t2on t1.id1 = t2.id2Where t2.id2 is NULLCorey |
 |
|
|
|
|
|