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 |
|
seware
Starting Member
11 Posts |
Posted - 2011-10-03 : 16:51:41
|
| Using 2008 R2...If I join a lookup table to anoher "main" table using a left outer join, and there is no matching row in the lookup table, the result will be a NULL entry for each field included from the lookup table. If I am using WHERE statement of "lookupfield1 <> 1", to filter out lookup rows with that field's value of '1', doesn't the case I described first (no matching row and thus NULL) satisfy "<> 1" Or is there no comparison performed because the field is NULL?Am I going to need to check for NULL and <> 1 in order for a "main" table record without a matching lookup record to be included?probably a newbie question... but I'm a bit confused.Thanks. |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
|
|
seware
Starting Member
11 Posts |
Posted - 2011-10-03 : 17:15:02
|
| That's it exactly! Thanks so very much. |
 |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
|
|
|
|
|