
What should I put in the “”Perform this query to select the UPSERT key” box?

What should I put in the “”Perform this query to select the UPSERT key” box?
Best answer by Ankit Singh
Hi
In CData Arc, the UPSERT queries are usually a combination of UPDATE and INSERT queries, i.e.
If an ID value (Primary Key) exists, UPDATE the record with the incoming data.
OR
If an ID value (Primary Key) DOES NOT exist, INSERT the record with the incoming data.
So normally, the application expects you to do UPSERT on an ID value or the Primary Key of the table, any field that is unique to the table that identified a row.
In the screenshot you shared, if the ‘id’ column is indeed the Primary Key of the ‘Shipment’ table, you can simply select UPSERT by id OR you can write your own query to find the UPSERT key.
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.