Closed atronah closed 2 weeks ago
You obviously use an outdated fbclient and firebird.msg:
SQL> merge into mds_test_merge as cur
CON> using (
CON> select 1 as id, 'new' as text from rdb$database union
CON> select 1 as id, 'super new' as text from rdb$database
CON> ) as upd
CON> on cur.id = upd.id
CON> when matched then update set text = upd.text;
Statement failed, SQLSTATE = 21000
Multiple source records cannot match the same target during MERGE
Thanks
Brief
Merge raises exception
unknown ISC error 335545269
if few lines ofusing
dataset match one row in target table and in that few lines one of updated fields has different values.Steps to reproduce
Create test table
Insert a test row into the test table
Try to use merge and get error
because in
using
dataset we have two rows withid=1
but with differenttext
.