I have researched everywhere but still can’t seem to fix a simple error:
Running Microsoft SQL server:
UPDATE copyprogmaster
SET active =
CASE
WHEN active = 1 THEN active = 0
WHEN active = 0 THEN active = 1
ELSE active
END
WHERE source = 'Mass_Mail'
my error is :
Line 4: Incorrect syntax near ‘=’.
Remove the
=after theTHEN, so:You already have
active =after theSETon the second line.