Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Find records not in another table
Message
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Environment versions
Visual FoxPro:
VFP 9
OS:
Windows XP
Network:
Windows 2003 Server
Database:
Visual FoxPro
Application:
Desktop
Miscellaneous
Thread ID:
01466852
Message ID:
01466854
Views:
35
>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
Previous
Reply
Map
View

Click here to load this message in the networking platform