Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
nidabp
Starting Member
15 Posts |
Posted - 2011-04-29 : 06:06:44
|
Hi, Merge TableA as Ausing((SELECT query)) as BON A.x = B.xWhen Matched and ReportPeriod = 1 Then UpdateSet JanMet = 1 and JanMetALT = 1When Matched and ReportPeriod = 2 Then UpdateSet FebMet = 1 and FebMetAlt = 1When Matched and ReportPeriod = 3 Then UpdateSet MarMet = 1 and FebMetAlt = 1...Is there a way to have conditional updates and inserts to different columnsThanx |
|
|
|
|