Update table in SQL if records exist, else than insert

Hi there,

I have workflow set up in Easymorph and will export the data to SQL server.

The purpose is that:

  • if the data records are already in SQL table, then we need to update the records
  • If the data records don’t exist in SQL table, we insert the data

I notice that the Export to Database and Update Database table is separate action, is there any way that we can combine the above conditions in one action? or any other suggestion?

Thank you!

Hi Christina,

updating and inserting can’t be combined into one operation in EasyMorph. Instead, derive two tables from your main table. In one table, use filters to keep the records that already exist and for them do “Update DB table”. In the other table, keep only the records that don’t exist, and for them do “Export to database”.

See also:

Thank you! ya the way you suggested is the way I’m trying right now.

But good to get your confirmation. thanks

You’re welcome!