I have two statements one for the "BatchNo = 110 case and another for the "not 110" case. I'm trying to combine these into a single CASE statement but can't get the syntax right. Any help appreciated.
TIA,
edm2
UPDATE t1
SET t1.CalculatedColumn = t2.[MyCalc]
FROM dbo.Table1 AS t1
INNER JOIN dbo.Table2 AS t2
ON t1.CommonField = t2.[Common Field]
WHERE t1.BatchNo = '110';
UPDATE t1
SET t1.CalculatedColumn = t2.[MyCalc] + 1
FROM dbo.Table1 AS t1
INNER JOIN dbo.Table2 AS t2
ON t1.CommonField = t2.[Common Field]
WHERE t1.BatchNo != '110';