Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: CASE statement implemented?
Thanks for the suggestion, but that is not exactly what I need. What Igor
wrote covers the (a>b) problem, I need to be able to evaluate *any*
expression. Besides, was there once a Case - statement in earlier
Oracle-verions?
Stefan
Igor Neyman wrote in message ...
>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 Tue Feb 23 1999 - 02:44:13 CST