Idea for function

From: <amerar_at_iwc.net>
Date: Tue, 20 May 2008 09:16:42 -0700 (PDT)
Message-ID: <984cdefa-9fd5-48ca-b8e8-d827c2021d2f@i76g2000hsf.googlegroups.com>

Hi,

We have an interesting thing there. Take a look at this:

NVL(cash+mark_secur,'-99999')

What we need to do is if the first value is -99999 and the second value is a legit number, make the first name 0. The same goes for the second. However, if BOTH values are -99999, then leave the result as -99999.

I'm thinking that I either need to use a complex DECODE, or some type of function. If it is a function, how would I pass values to it? I'd need to do the same for this:

NVL(round((sh_hold_equit-pref_stock)/shares,2),'-99999')

So, the number of values in the formula is unknown.........

Thanks! Received on Tue May 20 2008 - 11:16:42 CDT

Original text of this message