How to check if exists BEFORE the Insert
Hi,
I am struggling with the next:
I take some record from a DB T1 (in DBF)
Now I copy the data to an SQL DB T2.
The table of the SQl DB has a table called "done". This one is set to '0' incicially. Later in another program it can be set at '1'.
Every now and the I need to update the DB T2 with data from the DB T1.
But this results in that some records get duplicated. And one version has the columns "done" set at '0' and another at '1'. If I do again an update it adds another record with "done" at '0', etc...
How do I do an insert and also check that the new data is not already in the DB present?
Thx
Johny
|