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: calculated value in a DECODE statement

Re: calculated value in a DECODE statement

From: Anurag Varma <avdbi_at_hotmail.com>
Date: Mon, 17 Mar 2003 18:48:57 -0500
Message-ID: <v7cnnads3n1ab5@corp.supernews.com>


I would prefer case too.

However in case OP is wondering how to do it with decode:

DECODE(sign(numfield), -1, 0, numfield)

Anurag

"Galen Boyer" <galenboyer_at_hotpop.com> wrote in message news:usmtl4osl.fsf_at_standardandpoors.com...
> On 17 Mar 2003, galenboyer_at_hotpop.com wrote:
> > You need to put them all into one decode block.
>
> Arghhh!!!
>
> I wrote this little snippet before I understood what you were
> asking.
>
> --
> Galen Boyer
Received on Mon Mar 17 2003 - 17:48:57 CST

Original text of this message

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