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 |
unicorn
Starting Member
3 Posts |
Posted - 2006-08-21 : 01:14:51
|
HelloI used this query in mysql to take out records from the second table that there is'nt a corresponding ID for them in the first tableSELECT * FROM (first fLEFT JOIN second s ON f.courseId = s.courseId)WHERE isnull( s.userId ) it works fine, Now I'm using sql server and use the folloing query to do the sameSELECT * FROM (first fLEFT JOIN second s ON f.courseId = s.courseId)WHERE s.userId=NULL but it returns no records! what's the problem?thanks in advance. |
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2006-08-21 : 01:36:30
|
useWHERE s.userId IS NULLMadhivananFailing to plan is Planning to fail |
 |
|
eyechart
Master Smack Fu Yak Hacker
3575 Posts |
Posted - 2006-08-21 : 03:39:17
|
wouldn't an INNER JOIN accomplish this too?-ec |
 |
|
|
|
|