Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Decode equivalent within pl/sql?
9iR2
As I understand it you can only use DECODE as part of a SQL statement
e.g. select decode(var,
'A','LetterA',
'B','LetterB',
'Lettersomethingelse')
from dual;
In a pl/sql statement, you cannot code e.g.
l_string := decode(.....
What do you use to achieve a similar result - or do you set the value
into a variable beforehand with an
if
elsif
end if
structure?
Thanks
-- jeremy ============================================================ ENVIRONMENT: Oracle 9iR2 / Oracle HTTP Server / mod_plsql / Solaris 8 ============================================================Received on Mon Nov 13 2006 - 08:11:10 CST