Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Please Help on Decode statement
I am a new PL/Sql Programmer (Oracle 7.3)
I am trying to use decode as following but it does not work; I trying to avoid using a complex 'if then else' statement by the use of decode:
v_new_value:=decode(v_name,'one',1,'two',2,'0')
the error message I get is : you must use decode within sql.
If I use decode with a select then it works eg:
select decode(v_name,'one'1,'two,2) from table
help me please
Cheers. Received on Tue Nov 11 1997 - 00:00:00 CST