Please start any new threads on our new
site at http://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Our new SQL Server Forums are live!
Come on over! We've restricted the ability to create new threads on these forums.
Constraint Violating Yak Guru
Flowing Fount of Yak Knowledge
Very Important crosS Applying yaK Herder
quote:Originally posted by bandiUse MERGE statement..MERGE TableB as bUSING TableA as aON yourConditionWHEN MATCHED THEN UPDATE SET b.col1 = a.col1, b.col2 = a.col2 ............WHEN NOT MATCHED BY SOURCE THEN DELETE;http://www.databasejournal.com/features/mssql/article.php/3759636/SQL-Server-2008-MERGE-Statement.htm--Chandu