Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Logical operators
v_yordanov_at_my-deja.com wrote:
> Is is possible to simulate the IIF() function
> (available in MS-JET) with Oracle, or, more
> generally, to use logical operators inside
> expressions ?
In Oracle you can use the decoded expression. From Oracle documentation:
This expression decodes the value DEPTNO. If DEPTNO is 10, the expression evaluates to 'ACCOUNTING'; if DEPTNO is 20, it evaluates to 'RESEARCH'; etc. If DEPTNO is not 10, 20, 30, or 40, the expression returns 'NONE'.
DECODE (deptno,10, 'ACCOUNTING', 20, 'RESEARCH', 30, 'SALES', 40, 'OPERATION', 'NONE')
Ciao Gennaro Received on Fri Jun 11 1999 - 09:43:38 CDT