Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: ORA-06502 when moving from 8.0.5 to 8.1.7

Re: ORA-06502 when moving from 8.0.5 to 8.1.7

From: NM <nimesh_myanger_at_hotmail.com>
Date: 21 Dec 2001 00:11:11 -0800
Message-ID: <bdae89b.0112210011.539138fa@posting.google.com>


mark.powell_at_eds.com (Mark D Powell) wrote in message news:<178d2795.0112201104.3c354ec6_at_posting.google.com>...
>
> I remember that there was a bug where Oracle failed to cast nulls to
> being equal to all datatypes in pl/sql. You may well be hitting that
> bug, but I am not sure what the work around was. If you have support
> you might try using the advanced search against the bug database only
> to eliminate a ton of forum posts where people get this error for bad
> code. With luck you will find the right but report to see how to cast
> your result. You might also be able to devise your own work around
> using the nvl function.
>
> -- Mark D Powell --

Fixed it! Added temporary variables, and now it works. I don't know whether this is going to impact the performance too greatly, but there you go...

The new function looks like below:

create or replace function TEST_6502_FUNCT(buycurr IN CHAR, sellcurr IN CHAR)
RETURN CHAR IS b_curr CHAR(3);
s_curr CHAR(3);

b_curr := buycurr;
s_curr := sellcurr;

BEGIN
   IF b_curr IS NOT NULL THEN

      RETURN b_curr;
   ELSE
      RETURN s_curr;
   END IF;
END TEST_6502_FUNCT; Many thanks for your input.
NM Received on Fri Dec 21 2001 - 02:11:11 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US