Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> fyi/fwiw: unusual PL/SQL error message, implicit CHAR to VARCHAR2 with overloaded function
disclaimers:
yes, I know 8.1.7 is obsolete
yes, I know implicit datatype conversion is evil
none-the-less, i ran across an unusual error that i could find no references to in my exhaustive (2 or 3 attempts) googling...
i was testing a code-generation package in 8.1.7 that has an overloaded function; the 3 versions differ by name and type of the input parameter: VARCHAR2, DATE, NUMBER using the function in a SQL statement with a CHAR column raises 'ORA-06502: PL/SQL: numeric or value error: character string buffer too small', but apparently before calling the function -- each function has an exception handler, but none were ever invoked
i could not overload the function with a CHAR data type (cannot overload sub-types of the same data type), so the solution was to explicitly cast the CHAR as a VARCHAR2 before wrapping it in the function call
the whole scenario is fairly logical, except for the cryptic PL/SQL error message
++ mcs Received on Thu Oct 28 2004 - 07:25:11 CDT