Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Inserting from one table to another
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Titre:
Inserting from one table to another
Divers
Thread ID:
00800915
Message ID:
00800915
Vues:
56
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.
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform