I have a oracle package and there is a function in it which is having out parameters.
the package name lets say ppp and function name lets say fff. function is below and i am unable to execute the function with out parameters.
function-
FUNCTION fff (P_FID NUMBER,DUCTBANKLABEL VARCHAR2, SERVICEDUCTVALID OUT NUMBER ) RETURN VARCHAR2
----End of R3 - Obs#195 (1 Oct 2018)
AS
CNT NUMBER;
INSTDATE VARCHAR2(100);
DUCTSIZE NUMBER;
.
.
.
.
many more.......;
BEGIN
.
.
.function does its thing and returns the value
END;
Now am trying to call this function with a pl/sql block like this-
set serveroutput on;
declare
aa NUMBER:=129685933;
bb VARCHAR2:='1705297E TO P5547635';
cc NUMBER;
ANS VARCHAR2;
BEGIN
ANS:=ppp.fff(aa,bb,cc);
DBMS_OUTPUT.put_line(ANS);
END;
But getting the below error-
Error report:
ORA-06550: line 3, column 4:
PLS-00215: String length constraints must be in range (1 .. 32767)
ORA-06550: line 5, column 5:
PLS-00215: String length constraints must be in range (1 .. 32767)
06550. 00000 - "line %s, column %s:\n%s"
*Cause: Usually a PL/SQL compilation error.
*Action:
Please help on how can i execute this function
You need to specify
VARCHAR2
variable lengths in your anonymous PL/SQL block.