Oracle Sql to MS Sql Server Language

By bbouffor ·
In oracle SQL we have a function called "decode" we use in the select statement to replace a returned value with another value.

Select decode(cust_id
, 1, JIM
, 2, TOM
, 3 , MARY
, cust_id)
from cust table

I am trying to figure out what how I would accomplish this same process in a SQL Server select statement.

Thanks, and if you can give me a link to some site that might help me figure this type of question out I would appreciate it.


This conversation is currently closed to new comments.

Thread display: Collapse - | Expand +

All Answers

Related Discussions

Related Forums