Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Inserting from one table to another
Message
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Title:
Inserting from one table to another
Miscellaneous
Thread ID:
00800915
Message ID:
00800915
Views:
54
In "there must be a way" department....

I'm trying to copy volunteers from an old table, to a new table. Some of the records from the old table already exist in the new table.

I'm looking to use a single SQL statement to insert records from one table that don't have a corresponding record in another table. something like:
INSERT INTO person (last,first,volunteer,oldid);
VALUES (volunteer.last,volunteer.first,.t.,volunteer.person);
WHERE volunteer.person NOT IN (select oldid as person FROM person)
Right now, I'm doing this with SCAN-ENDSCAN....and locate....the old dBase syntax.

TIA
-- Larry Keyes
Remember only You can prevent Gray Goo. Never release nanobot assembers without replication limiting code.
Next
Reply
Map
View

Click here to load this message in the networking platform