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 |
|
yawnzzzz
Starting Member
13 Posts |
Posted - 2009-07-22 : 14:51:41
|
Hi,I have products in one table and styles in another table. I want to find the products where there's no corresponding style.This should get the list:SELECT p.PRODUCT, s.STYLE FROM PRODUCTS p LEFT JOIN STYLES s on p.STYLE_ID = s.STYLE_ID , but it's millions of lines long, so I'd like to just see the one's without a corresponding style.I thought about:WHERE s.STYLE = NULL ...but that returns nothing, so I'm not sure if everything is working correctly, or if that won't work. |
|
|
jimf
Master Smack Fu Yak Hacker
2875 Posts |
Posted - 2009-07-22 : 14:57:10
|
| WHERE s.STYLE IS NULLJim |
 |
|
|
yawnzzzz
Starting Member
13 Posts |
Posted - 2009-07-22 : 14:59:43
|
| Perfect! Thank you. |
 |
|
|
X002548
Not Just a Number
15586 Posts |
|
|
|
|
|