I am developing a mechanism that uploads records to CartoDB - first by importing the records to a new table, and then insert the records from the new table to an existing table.
The problem is that the existing table may already contain some of the records (each record has a unique record_id) - in this case I would like to override the existing values with the values of the new record.
This could be done in two steps, by deleting the existing records (whose record_id is in the new table) and then insert all the records from the new table.
The SQL MERGE command should allow to do that in a single command. Is this command supported by CartoDB? Can you give an example with the exact the syntax? (I am getting a 'Syntax error at or near "MERGE"').