Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
SQL that list all recs from 1 table without match in 2nd
Message
 
To
08/09/2000 16:42:04
Peter Brama
West Pointe Enterprises
Detroit, Michigan, United States
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00414411
Message ID:
00414415
Views:
23
>For simple explanation....
>
>I have two tables with these fields:
>
>MASTER
>cname = char
>
>DETAIL
>cname = char (match above cname)
>dorder = date
>
>I need to create a list of all the MASTER records that DO NOT have a matching record in the detail.
>I believe this should be a simple SQL select but I can't figure out how to get the joins / where clause
>to work right so that I only get the MASTER records.
>
>HELP!!! Something simple and it's driving me nuts!!!

sele * ;
from Master ;
where cname not in (sele dist cname from detail) ;
into cursor whatever
Rip Ryness
International Falls, MN
Previous
Reply
Map
View

Click here to load this message in the networking platform