Updating SQL database

Hey there

I have a robot that get data from excel sheets and which inserts it in a SQL database.

I have to run the robot each month where the excel sheet either have new rows or some of the rows has been updated.

In the SQL table the columns are named

  • UUID that is the primary key
  • Auto
  • Status
  • Brand
  • Number
  • Note1

I know I have to use the “Execute Non Query” activity. But how do I ensure that

When new UUID add it to the database and when UUID exist then update the different columns that is together with the UUID

Thank you in advance!


Hi @Jannik_HR ,

Perhaps you can use a Execute Query activity for checking if the UUID exists. Afterwards, based on your query result, you should add or edit something in your database

It might look like:

Best regards,

first you have to check the dt.row(0) of uuid to sql data table using execute query and check your sql data if data found use update query to update else use Non Query