Using Describe Objects | Generate Merge Statement. It's using the same d. alias for the insert when it should be using the s alias. For example:
create table toadsample1( id varchar2(1), value varchar2(1), c1 number, c2 number, c3 number )
Here is the merge statement that was generated:
MERGE INTO TOADSAMPLE1 d USING ( Select as ID, as VALUE, as C1, as C2, as C3 From Dual) s
ON (/* insert your merge source here */)
WHEN MATCHED THEN UPDATE SET d.ID = s.ID, d.VALUE = s.VALUE, d.C1 = s.C1, d.C2 = s.C2, d.C3 = s.C3 WHEN NOT MATCHED THEN INSERT ( d.ID, d.VALUE, d.C1, d.C2, d.C3) VALUES ( d.ID, d.VALUE, d.C1, s.C2, s.C3);
Note that the 'When not matched' is pointing to alias 's' for some columns, when it should be pointing to the 'd' alias i.e.
WORKAROUND
Create the merge statements via the data grid | export dataset | output format: Merge Statements
STATUS
Waiting for fix in a future release of Toad for Oracle
© 2025 Quest Software Inc. ALL RIGHTS RESERVED. Terms of Use Privacy Cookie Preference Center