When you use Merge statement, you cannot update the columns reference in the ON Clause.
Not many know that, Merge supports "WHERE Clause".
Add a Where Clause to your Update statement under "When Matched"
Merge Into ...
Using ()
When Matched then
Update ...
Where ...
When Not Matched then
......
No comments:
Post a Comment