Sunday, November 30, 2014

2 Where Claues with 1 Sub query using NOT IN notation

This is what i had before you posted:



Select CompanyName From Customers
Where Region NOT IN (Select Region From Employees
Where Country = 'USA' AND Country = NULL )
Order By CompanyName;



I can see where i went wrong with Where Clauses I had some of it correct when it came to the columns for each table. I see i should have had Country in the first where clause with the AND Logical Operator than Region field I had it backwards. I will make note of the IS NOT NULL and IS NULL in my book for future reference. I also noticed i did not have a Compound statement so i added that just in the wrong place.


Thank You for help.





No comments:

Post a Comment