You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There are some great examples here for 'Multiple updates in one query' is it possible to also provide an example of how to do a merge with dynamic values using 'postgres'? Postgres 15 now allows this kind of SQL:
merge into station_data_actual sda
using station_data_new sdn
on sda.station_id = sdn.station_id
when matched then
update set a = sdn.a, b = sdn.b, updated = default
when not matched then
insert (station_id, a, b)
values (sdn.station_id, sdn.a, sdn.b);
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
There are some great examples here for 'Multiple updates in one query' is it possible to also provide an example of how to do a merge with dynamic values using 'postgres'? Postgres 15 now allows this kind of SQL:
Beta Was this translation helpful? Give feedback.
All reactions