views:

16

answers:

0

I have a target table which has a lot of dependent tables. I am trying to modify the table data using the MERGE statement. Insert/Update is fine, but there is a problem while deleting.
WHEN NOT MATCHED BY SOURCE THEN DELETE; Here the data needs to be deleted from the dependent tables as well. Is it possible to call a stored procedure which performs these multiple deletes in the 'WHEN NOT MATCHED BY SOURCE THEN' clause? (I do not have an On Delete Cascade constraint)