Re: DECODE

From: AWILSON <awilson_at_rci.rogers.com>
Date: 1996/12/09
Message-ID: <32AC8438.6883_at_rci.rogers.com>#1/1


Les Sprott wrote:
>
> I am trying to use the following logic in a DECODE statement:
>
> if the ((abs(x/y))-1) > .02 then 'Y' elses 'N'.
>
> any help would be greatly appreciated.
>
> Les Sprott
> Transco Energy

Hah! Where you see a '>' or a '<' then think 'sign'.

select ((abs(x/y))-1),

    decode(sign(((abs(x/y))-1) - .02),

              1,'Y',
              'N')

 from sys.dual

Hope that helps.



The above reflect my personal views and in no way are connected with whomsoever I may be working for at this particular point in time.  
Alan Wilson                              Help fight continental drift.
======================================================================
Received on Mon Dec 09 1996 - 00:00:00 CET

Original text of this message