question

smiley avatar image
smiley asked

bm table has duplicate rows in it . but i want to merge the bmto fbm without any dupplicate rows

MERGE INTO fbm f USING (select distinct * form bm b) ON (f.EMPLOYEE_ID= b.EMPLOYEE_ID) WHEN MATCHED THEN UPDATE SET f.EMPLOYEE_ID = b.EMPLOYEE_ID WHEN NOT MATCHED THEN INSERT VALUES(b.EMPLOYEE_ID);
mergesubquerydistinct
1 comment
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Usman Butt avatar image Usman Butt commented ·
Please post the DDL of the tables, some dummy data and output required.
0 Likes 0 ·

0 Answers

·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.