Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: CASE statement implemented?
Oh, yes.
You can do it with DECODE:
DECODE(SIGN(a-b), 1, 'greater', equal or less')
I consider 'DECODE' not less powerful then IF/ELSE constructs. Besides, you can use DECODE inside SQL statement.
Igor
Stefan Sandow wrote in message <7arvls$3q5$1_at_black.news.nacamar.net>...
>Hi there,
>I desparate need to know if there is a CASE statement implemented in Oracle
>8, where you can evaluate expressions like the following:
>
>CASE
>WHEN
> (a>b)
> then 'greater'
> else
> 'not greater'
>end
>I know that there is a DECODE, BUT..
>It can't do things like:
>DECODE((a>b), True, 'greater', 'not greater')
>
>Thanks for any usefull suggestion!
>Stefan
>
Received on Mon Feb 22 1999 - 13:37:33 CST
![]() |
![]() |