Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Is there any HIGH_VLAUE or LOW_VALUE for numeric comparision
You might try this:
if v_number is null and v_compare_value is null then
do both_null_something
elif v_number is null then
do v_number_is_null_something
elif v_compare_value is null then
do v_compare_value_is_null_something elif v_number := v_compare_value then
do equal_something
else do not_equal_something
Several of the *_something could be the same; do whatever you need to do.
suisum_at_freenet.edmonton.ab.ca wrote:
> Hi:
>
> If I want to trap the NULL numeric value, I want it compare with the
> HIGH_VALUE to avoid the following situation. For instance,
>
> v_number NUMBER(5) := 99999;
> v_compare_value NUMBER(10) := NULL
>
> If NVL(v_number, 99999) = NVL(v_compare_value, 99999) THEN
> do somthing;
> END IF;
>
> The above statement will be TRUE as they are both 99999.
>
> --
> Best regards,
Received on Sat Oct 10 1998 - 15:41:06 CDT