>>>>>>I want to get the abs(num1 - num2).. and have the result
>>>>>>be a percent..for example...
>>>>>>?abs(12-14)... the result is 2, but what percent is 2 of the two numbers?
>>>>>
>>>>>The larger or the smaller? For the range of non-negative real numbers:
>>>>>
>>>>>? 100*ABS(a-b)/MAX(a,b) && % larger
>>>>>? 100*ABS(a-b)/MIN(a,b) && % smaller
>>>>>
>>>>>The math changes when you encompass negative numbers treating size as their scalar distance from 0 (you need to use ABS(a) and ABS(b)) or you start dealing with other than real numbers.
>>>>----------------
>>>>Hi Ed...I no what you mean. I am having problems because I do have negative
>>>>numbers and NULL values. What can I do to fix this problem? ...:)
>>>
>>>Is the difference of (2,-10) 12 or 8? NULLs are handled by using NVL() to substitute a 0 value.
>>---
>>The difference is 8...thanks for your help...:)
>
>a = ABS(a)
>b = ABS(b)
>
>nDiff = ABS(a-b)
>nMinPerc = nDiff/MIN(a,b)
>nMaxPerc = nDiff/MAX(a,b)
-------------
ok thanks...:)