Answer for:

TSQL If/When issue

Message 2 of 8

View entire thread
0 Votes
Tony Hopkinson

brackets round Else 0

They are to indicate else is optional in the case statement documentaion.

It's a bit naughty but I think I'd be looking at a cursor and a temporary table to do that lot.

Or perhaps another table and some triggers.