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
about merge y
its not natural to one record statements
you must do some trick e.g with select from RDB$DATABASE
and then you have more reads then needed (not optimal)
Submitted by: @livius2
normally update statement allow somethink like this
update table1 set field1 = coalesce(field1, 0) + 1 where id=5
but
UPDATE OR INSERT INTO table1(id, field1) VALUES(5, coalesce(field1, 0) + 1) MATCHING (ID)
is not possible
now only solution is
UPDATE OR INSERT INTO table1(id, field1) VALUES(5, coalesce(
(SELECT field1 FROM table1 where id=5)
, 0) + 1) MATCHING (ID)
and the same select for other fields
The text was updated successfully, but these errors were encountered: