Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: IIF IN ORACLE
Besides Volker's reference to the CASE statement there is also the
older DECODE function. Both CASE and DECODE can be used in the SELECT
list and in the WHERE cause. You should probably choose to use CASE
instead of DECODE but older code will have decode in it.
where values for fld1 are 1, 2, and 3.
1* select decode(fld2,1,'ONE',2,'TWO','UNKNOWN') from marktest UT1 > /
DECODE(
HTH -- Mark D Powell -- Received on Mon May 08 2006 - 12:13:21 CDT
![]() |
![]() |