Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Find records not in another table
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Versions des environnements
Visual FoxPro:
VFP 9
OS:
Windows XP
Network:
Windows 2003 Server
Database:
Visual FoxPro
Application:
Desktop
Divers
Thread ID:
01466852
Message ID:
01466854
Vues:
36
>All I want to do is hav an SQL statement that gets a list of items from the main item table,but not list items already selected in the other table.
>
>Any ideas?
>Mike
select T1.* from myTable T1 where not exists (select 1 from AnotherTable T2 where T2.ID = T1.ID)
Take a look also here

http://blogs.lessthandot.com/index.php/DataMgmt/DataDesign/the-ten-most-asked-sql-server-questions--1#4
If it's not broken, fix it until it is.


My Blog
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform