This content has been marked as final. Show 3 replies
for complex conditions the CASE construct is easier to use:
SELECT (CASE WHEN Condition THEN <value or calculation>
Just to add to the above posters..
This can also be nested, though I forget how many levels...
case [value] when [value] then [some value] else [some value] end;
The thing to remember is that case, like decode, always returns a value.
case [value] when [value] then case [value] when [value] then [value] end; end;