Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SQL

when matched in sql server

MERGE Locations T
USING Locations_stage S ON T.LocationID=S.LocationID
WHEN MATCHED AND T.LocationID =3 THEN
DELETE 
WHEN MATCHED AND T.LocationID =1 THEN
UPDATE SET LocationName=S.LocationName;
 
PREVIOUS NEXT
Tagged: #matched #sql #server
ADD COMMENT
Topic
Name
2+5 =