I have a main database and a report database, and I need to sync a table from main into report.
main
report
However, when an item
You can do it with a separate UPDATE statement
UPDATE report.TEST target SET is Deleted = 'Y' WHERE NOT EXISTS (SELECT 1 FROM main.TEST source WHERE source.ID = target.ID);
I don't know of any way to integrate this into your MERGE statement.