Question Locked

Oracle Sql to MS Sql Server Language

0 helpful
2 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

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

example
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.

Barb

2 replies

This discussion is closed to new replies.