Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
About select where not in
Message
 
To
24/08/2006 04:03:00
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 6
Miscellaneous
Thread ID:
01148129
Message ID:
01148168
Views:
14
Evelyn,

How about just UNIONing the tables. I believe, by default, it ignores duplicate rows unless you specify UNION ALL:
SELECT * FROM tableA ;
UNION ;
SELECT * FROM tableB ;
INTO tableC
You could also add DISTINCT after the SELECT on each query if you have duplicates within either of the tables. Or, did you have a specific reason for wanting to use the NOT IN clause?

HTH,
Chad


>Hi,
>
>I have two tables. I want to know whether records from table B is in table A. I want to save all unique records to another table C.
>
>How do I this with the where NOT IN clause? There are about 19 fields for each table.
>
>Whenever I used NOT IN, I always indicate the field names of each table. Is this correct?
>
>Please advise. TIA.
_________________________________
There are 2 types of people in the world:
    Those who need closure
Previous
Reply
Map
View

Click here to load this message in the networking platform