CarlMartin10
08-18-2010, 05:26 AM
I am trying to get better at using Joins, and I have gone through pretty far, but I am not having luck with this one. I am using a SQL book to learn this, and it is pretty good, but this one question tonight is not going so well. If you can help me out, thanks!
Here is the question in the book:
Generate a list of products (ProductName) that have never been ordered (outer join between [Order Details] and Products).
Here is my code as of now:
Use Northwind;
SELECT Products.ProductName
FROM Products LEFT OUTER JOIN [Order Details]
ON Products.ProductID =
[Order Details].ProductID
WHERE [Order Details].Quantity = NULL
This is returning no data at all. I have some thoughts as to why, but my other methods are not working too well!
Here is the question in the book:
Generate a list of products (ProductName) that have never been ordered (outer join between [Order Details] and Products).
Here is my code as of now:
Use Northwind;
SELECT Products.ProductName
FROM Products LEFT OUTER JOIN [Order Details]
ON Products.ProductID =
[Order Details].ProductID
WHERE [Order Details].Quantity = NULL
This is returning no data at all. I have some thoughts as to why, but my other methods are not working too well!