Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
SQL Insert or Update
Message
From
06/05/2003 16:46:16
 
 
General information
Forum:
Visual FoxPro
Category:
Client/server
Miscellaneous
Thread ID:
00785578
Message ID:
00785591
Views:
11
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
Previous
Reply
Map
View

Click here to load this message in the networking platform