Search
 
SCRIPT & CODE EXAMPLE
 

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;
Comment

PREVIOUS NEXT
Code Example
Sql :: Import zipped mysql dumps 
Sql :: how to put is null in where in clause 
Sql :: sql server python connection 
Sql :: xampp mysql command to import a large database 
Sql :: group_concat mysql 
Sql :: add column mysql with foreign key 
Sql :: mysql date_format 
Sql :: select only unique values from and to current table 
Sql :: mysql sort asc numeric 
Sql :: create a table in sql 
Sql :: unique key in sql 
Sql :: install mysql 
Sql :: sql server inner join convert collation 
Sql :: sql use with to get value counts and percentages 
Sql :: sum row in sql 
Sql :: md5 encode oracle 
Sql :: how to limited number of rows in db2 select * from imglib FETCH FIRST 20 ROWS ONLY 
Sql :: top frequency in sql server 
Sql :: oracle for loop on list 
Sql :: drop domain postgresql 
Sql :: xml to column sql 
Sql :: join vs inner join 
Sql :: sql update by id 
Sql :: sql merge statement 
Sql :: what is top n result in sql 
Sql :: install pymysql in python 3 in windows 7 v2.7.10 codes with pip 
Sql :: mysql set column equal to another automatic 
Sql :: reset postgresql password windows 
Sql :: min max in sql 
Sql :: clustered-nonclustered indexes(constraints) 
ADD CONTENT
Topic
Content
Source link
Name
8+9 =