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'

  • 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

    Unfortunately the offer_type doesn't exist in the target table 🙁