Hello,
I have an interesting twist on the ever loved PLS-00306 wrong number or types of arguments in call to ... error!
I have a stored procedure which amongst other things, has a function defined inside of it. Cut down version is like so:
Now I call this function from a cursor in the main program, the cursor resembles this:
Trying to compile this procedure brings back the error:
119/38 PLS-00306: wrong number or types of arguments in call to 'HSF_SUPP_TYPE'
Can't for the life of me work out why, but the interesting thing is, if I comment the function out of the procedure and compile it as a stand alone stored procedure on the database, the procedure then compiles fine!
Has anyone encountered this before or possibly know why this should happen?
Cheers!
I have an interesting twist on the ever loved PLS-00306 wrong number or types of arguments in call to ... error!
I have a stored procedure which amongst other things, has a function defined inside of it. Cut down version is like so:
Code:
CREATE OR REPLACE PROCEDURE hsp_ext_didos_corp (
pn_status IN OUT NUMBER,
pc_error_no IN OUT VARCHAR2,
pc_error_mess IN OUT VARCHAR2,
pc_directory IN VARCHAR2,
pc_filename IN VARCHAR2)
IS
-- Some variables
-- Some cursors
-- some procedures
--My function
FUNCTION hsf_supp_type(p_sup_sup_id VARCHAR2)
RETURN VARCHAR2 IS
lc_supp_type VARCHAR2(1);
BEGIN
... code ...
lc_supp_type := '7';
RETURN lc_supp_type;
END hsf_supp_type;
BEGIN
.. main code ....
END hsp_ext_didos_corp
Now I call this function from a cursor in the main program, the cursor resembles this:
Code:
SELECT DECODE(whatever, '2', hsf_supp_type(varcharvariable), NULL)
FROM wherever
WHERE whatever
Trying to compile this procedure brings back the error:
119/38 PLS-00306: wrong number or types of arguments in call to 'HSF_SUPP_TYPE'
Can't for the life of me work out why, but the interesting thing is, if I comment the function out of the procedure and compile it as a stand alone stored procedure on the database, the procedure then compiles fine!
Has anyone encountered this before or possibly know why this should happen?
Cheers!