Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: DECODE on numeric field
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