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: Igor Neyman <ineyman_at_perceptron.com>
Date: Mon, 22 Feb 1999 14:37:33 -0500
Message-ID: <F4155D9F9AA4D111B9990020AFBA52D50CEF60@ftp.sfi-software.com>


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

Original text of this message

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