Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Using SELECT REPLACE for multiple values

626119Mar 23 2010 — edited Mar 23 2010
I would need to replace following resulting values into new values in a select sentence

2 -> DEPT2
3 -> DEPT3
4 -> DEPT4

SELECT REPLACE(DEPT_ID, "2", "DEPT2") from USER.TABLE

This is a single row resulting SQL. so, if value 2 occurs as a result, replace it in the results with 'DEPT2'. If value 3 occurs as a result, replace it in the results with 'DEPT3' etc.

Can someone help me with the nested SQL?

Thanks!
This post has been answered by Prazy on Mar 23 2010
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Apr 20 2010
Added on Mar 23 2010
6 comments
15,487 views