Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Insert / Update
Message
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Titre:
Insert / Update
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows XP
Network:
Windows XP
Database:
Visual FoxPro
Application:
Desktop
Divers
Thread ID:
01503367
Message ID:
01503367
Vues:
99
Is there a way to “update” a table from another table appending or inserting only items that are not already in the target table with one function?
Currently I create a cursor containing only those values not already in the target table, then scan it and do the insert function.

This seems a little like brute force. Is there a more elegant way?

I was looking at Update – SQL, but it seems it can only change existing field values.

I was thinking something along these lines;

Insert into A ;
(F1, F2, F3) ;
Where !F1 IN (select B.F1 from B)
Values ;
(B.F1, B.F2, B.F3)

Thanks in advance

Gary
Driving toward a Tactical Edge
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform