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: DECODE on numeric field

Re: DECODE on numeric field

From: Kenneth C Stahl <BluesSax_at_Unforgettable.com>
Date: Tue, 17 Aug 1999 07:41:11 -0400
Message-ID: <37B94A57.967EDDD6@Unforgettable.com>


You have the right idea. What you also need is the sign() function:

decode(sign(amount),-1,'NEGATIVE',1,'POSITIVE','ZERO')

Ken

Dipen Kotecha wrote:

> Is it possible to use DECODE with a numeric field. For example :
>
> DECODE (amount, <0, 'NEGATIVE', 0, 'ZERO', 'POSITIVE')
>
> Any help would be appreciated.
>
> Thanks in advance,
>
> Dipen
Received on Tue Aug 17 1999 - 06:41:11 CDT

Original text of this message

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