Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Stuck, it seems easy
Message
General information
Forum:
Microsoft SQL Server
Category:
SQL syntax
Environment versions
SQL Server:
SQL Server 2000
Miscellaneous
Thread ID:
01091687
Message ID:
01091706
Views:
10
select item from table1 
  WHERE NOT EXISTS ( SELECT * FROM table2 WHERE table2.item = table1.item )
-- Or
select item from table1 
  WHERE item NOT IN ( SELECT item FROM table2 )
>I'm stuck hopefully someone can help me
>
>
>I have two tables lets say 1 and 2. Table 1 has a,b,c,d. Table 2 has a and b. I want to get all the items from tables 1 that are NOT listed in table 2.
>
>
>select table.item from table1 left join table2 on item = item where table1.item <> table2.item order by p.plinid
>
>
>Not getting the results I need. If anyone can help with this, please help! Thanks!
--sb--
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform