Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: IIF IN ORACLE
Mark D Powell (Mark.Powell_at_eds.com) wrote:
: Besides Volker's reference to the CASE statement there is also the
: older DECODE function.
It may not be clear how this is useful if you wish things like
IF A between 1 and 10...
for the OP, the usual trick is to use SIGN and some simple arithmetic
decode( sign(a-1), -1 , return_value_when_a_less_than_1 , decode( sign(a-10), 1 , return_value_when_a_more_than_10 return_value_when_a_between_1_and_10 ) )
$0.10 Received on Mon May 08 2006 - 16:39:39 CDT
![]() |
![]() |