Home Forums SQL Server 2008 T-SQL (SS2K8) MERGE Statement DELETE from TARGET when not in SOURCE 'hanging' RE: MERGE Statement DELETE from TARGET when not in SOURCE 'hanging'
bugg
SSCertifiable
Points: 7567
More actions
June 21, 2013 at 8:22 am
#1626342
Cowboy DBA (6/21/2013)This help?WHEN NOT MATCHED BY SOURCE AND c_target.sessionid = @sessionid AND c_target.offer_type = 'GWP' THEN DELETE
Cowboy DBA (6/21/2013)
WHEN NOT MATCHED BY SOURCE AND
c_target.sessionid = @sessionid
AND c_target.offer_type = 'GWP'
THEN DELETE
Unfortunately the offer_type doesn't exist in the target table 🙁