Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Stuck, it seems easy
Message
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Syntaxe SQL
Versions des environnements
SQL Server:
SQL Server 2000
Divers
Thread ID:
01091687
Message ID:
01091706
Vues:
11
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--
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform