what is the equivalent syntax in MSSQL for DECODE() in Oracle?
what is the equivalent syntax in MSSQL for DECODE() in Oracle?
You will have to use case statement for that. There is no decode in MS SQL.
Here 's the syntax.
CASE input_expression
WHEN when_expression THEN result_expression
[ ...n ]
[
ELSE else_result_expression
]
END
Searched CASE function:
CASE
WHEN Boolean_expression THEN result_expression
[ ...n ]
[
ELSE else_result_expression
]
END
If you want more info on this, visit the following link.
MSDN Link
Cheers!
Kalayama
[COLOR="Blue"][SIZE="2"]"If you are not living on the edge of your life, you are wasting space"[/SIZE][/COLOR]
Someone says "Impossible is nothing". The man next him says "Let me see you licking your elbow tip!"