Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: CASE statement implemented?

Re: CASE statement implemented?

From: Stefan Sandow <stefan.sandow_at_gmx.de>
Date: Tue, 23 Feb 1999 09:44:13 +0100
Message-ID: <7atpj9$nm8$1@black.news.nacamar.net>


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

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US