Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
SQL Insert or Update
Message
De
06/05/2003 16:46:16
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Client/serveur
Divers
Thread ID:
00785578
Message ID:
00785591
Vues:
12
This message has been marked as the solution to the initial question of the thread.
I'm assuming that you want to determine whether the row already exists in the table. If so, use the EXISTS() function

IF EXISTS (SELECT * FROM mytable WHERE ...)
UPDATE ...
ELSE
INSERT ...

-Mike

>I am moving data from a running system with DBF tables to SQL server. New and changed records shall be sent to the SQL database. What is the best way to select records to be updated and which records to be inserted?
Michael Levy
MCSD, MCDBA
ma_levy@hotmail.com
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform