I want to export data, as sql updates, from a source db, and run the updates on a target db
To do this, I write a select, and then click the export as sql updates selection, but, I want to format the resulting export to update by path, and not id, for example
UPDATE core_config_data SET scope = 'default', scope_id = 0, path = 'some/path', value = 'some_value', updated_at = '2021-05-26 05:55:52' WHERE config_id = 1111;
Instead of "WHERE config_id = 1111;" I'd like to have it WHERE path = ..
How do I do that?
The long way I did this was with an SQL query like below
concat('UPDATE core_config_data SET value = \'', c.value, '\' WHERE path = \'', c.path, '\'') as `update_statement`,
from core_config_data c
where c.path like '%string_to_match%'
Is there a way I can do this with DataGrip?