Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Subquery failing
Message
 
To
18/07/2011 11:37:04
General information
Forum:
Microsoft SQL Server
Category:
SQL syntax
Miscellaneous
Thread ID:
01518439
Message ID:
01518447
Views:
44
>Here we are again
>
>
>select individual_ref from contact where individual_ref in (190999,191000,191001,191002)
>
>
>returns
>
>191002
>191002
>
>there are 2 matching records. Thats correct
>
>
>
>select individual_ref from individual where family_ref = 190997
>
>
>returns
>
>190999
>191000
>191001
>191002
>
>again thats correct
>
>So why would
>
>
>select i.individual_ref from individual i where not EXISTS (select c.individual_ref from contact c ) 
>
>
>return no rows ?
>
>I'm expecting
>
>190999
>191000
>191001
>
>any ideas .
>
>Thanks

Maybe because there is no WHERE clause in subquery?
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.
Previous
Reply
Map
View

Click here to load this message in the networking platform