Error Pls-00307 Too Many Declarations Of Match This Call
Contents |
here for a quick overview of the site Help Center Detailed answers to any
Pls-00307 Too Many Declarations Of Procedure Match This Call
questions you might have Meta Discuss the workings and policies pls-00307 too many declarations of define_column match this call of this site About Us Learn more about Stack Overflow the company Business Learn more about
Pls-00307 Too Many Declarations Of 'parse' Match This Call
hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow ora 06553 pls 307 is a community of 4.7 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up Overloading problem: Error(83,5): PLS-00307: too many declarations of 'REPORTEQ' match this call up vote 1 down vote favorite So I am trying to use overloading but I am having some pls-00307: too many declarations of 'set_job_argument_value' match this call troubles. My package has 4 procedures with the same name but different type of arguments (VARCHAR2, NUMBER, BOOLEAN, DATE). The packahe header and body are at the end of my question. I am trying to use the package procedure like this: OPEN bookCountCur; FETCH bookCountCur INTO how_many; testutil.reporteq('add procedure, book record count', expected_value => '1', actual_value => how_many); CLOSE bookCountCur; OPEN copiesCountCur; FETCH copiesCountCur INTO how_many; testutil.reporteq('add procedure, book copy record count', expected_value => '1', actual_value => how_many); CLOSE copiesCountCur; And I am getting this compilation error: Error(83,5): PLS-00307: too many declarations of 'REPORTEQ' match this call What does it mean? Package header: CREATE OR REPLACE PACKAGE TESTUTIL AS /* TODO enter package declarations (types, exceptions, methods etc) here */ PROCEDURE reporteq(description IN VARCHAR2 , expected_value IN VARCHAR2, actual_value IN VARCHAR2); PROCEDURE reporteq(description IN VARCHAR2 , expected_value IN NUMBER, actual_value IN NUMBER); PROCEDURE reporteq(description IN VARCHAR2 , expected_value IN BOOLEAN, actual_value IN BOOLEAN); PROCEDURE reporteq(de
many declarations of XYZ match this call While doing some tests before publishing my previous posting, i came across the following
00307 Country Code
exception that is to be rarely seen when calling overloaded procedures (or functions) like this APEX_MAIL.SEND:declarevar_addressee varchar2(255) := '...';var_sender varchar2(255) := '...';var_title varchar2(80);beginapex_mail.send(p_to => var_addressee,p_from => var_sender,p_subj => var_title,p_body => null);end;ORA-06550: line 6, column 1:PLS-00307: too many declarations of 'SEND' match this callORA-06550: line 6, column 1: PL/SQL: Statement ignoredThe problem is highlighted http://stackoverflow.com/questions/6010069/overloading-problem-error83-5-pls-00307-too-many-declarations-of-reporteq in purple.Since APEX_MAIL.SEND comes in two versions (in other words it is an overloaded procedure), if we pass null to parameter p_body, the parser cannot decide whether it should reference the function version accepting p_body as VARCHAR2 or the version accepting p_body as CLOB.The workaround is to replace null with some more meaningful expression.Note http://oraclequirks.blogspot.com/2007/05/pls-00307-too-many-declarations-of-xyz.html that in general it could be enough to store null into a variable of the desired type, but this is not the case of APEX_MAIL.SEND that would just return the error i described in my previous posting. Posted by Byte64 at 15:08 Email ThisBlogThis!Share to TwitterShare to FacebookShare to Pinterest Labels: APEX_MAIL, ORA-06550, Oracle Server Errors, overloading, PL/SQL, PLS-00307 5 comments: Anonymous said... You're a legend mate, I was stuck on this one for ages, the script worked in SQLPLUS but failed with this error in Forms. I was pondering how to extract all the bloody code and put it in a package... but you saved me, thanks!Steve White Tuesday, 03 June, 2008 Rich J. said... I've just discovered this page via Google. It led me to find that the same error can occur if a procedure was "accidentally" overloaded -- when the datatypes in the declaration of a proc/function don't exactly match between the package and package body.Thanks
for Help Receive Real-Time Help Create a Freelance Project Hire for a Full Time Job Ways to Get Help Ask a Question Ask for Help Receive Real-Time Help Create a Freelance Project Hire for a Full Time Job https://www.experts-exchange.com/questions/22490083/PLS-00307-too-many-declarations-of-'TO-CHAR'-match-this-call-WHY-Whats-the-fix.html Ways to Get Help Expand Search Submit Close Search Login Join Today Products http://www.orafaq.com/forum/t/45084/2/ BackProducts Gigs Live Careers Vendor Services Groups Website Testing Store Headlines Experts Exchange > Questions > PLS-00307: too many declarations of 'TO_CHAR' match this call - WHY???? Whats the fix? Want to Advertise Here? Solved PLS-00307: too many declarations of 'TO_CHAR' match this call - WHY???? Whats the fix? Posted on 2007-04-03 Oracle Database too many Databases 1 Verified Solution 3 Comments 8,751 Views Last Modified: 2013-12-07 Can anyone tell me why the following works: SELECT m.value||'\'||'ORA'||ltrim(to_char(p.spid,'00000'))||'.trc' FROM v$session s, v$process p, v$instance i, v$parameter m WHERE m.name = 'user_dump_dest' AND p.addr= s.paddr AND userenv('SESSIONID') = s.audsid AND s.server='DEDICATED'; but the following gives me an annoying PLS-00307: too many declarations of 'TO_CHAR' match this call error: CREATE OR REPLACE PROCEDURE rssyncit1 IS too many declarations location varchar2(255); BEGIN dbms_utility.exec_ddl_statement('alter database backup controlfile to trace'); SELECT iv.traceloc INTO location FROM ( SELECT m.value||'\'||'ORA'||ltrim(to_char(p.spid,'09999'))||'.trc' traceloc FROM v$session s, v$process p, v$instance i, v$parameter m WHERE m.name = 'user_dump_dest' AND p.addr= s.paddr AND userenv('SESSIONID') = s.audsid AND s.server='DEDICATED' ) iv; insert into mycontrol_files values(location); EXCEPTION WHEN NO_DATA_FOUND THEN NULL; WHEN OTHERS THEN -- Consider logging the error and then re-raise RAISE; END rssyncit1; / 0 Question by:Robert Silver Facebook Twitter LinkedIn Google LVL 2 Active 6 days ago Best Solution byRobert Silver Actually I figured out the problem. See I was runing to_char() on a varchar and not a number. Odd though that it only fails in a function. My solution was to change it like so: Note that I added a, Go to Solution 2 Comments LVL 142 Overall: Level 142 Databases 41 Oracle Database 38 Message Active today Expert Comment by:Guy Hengel [angelIII / a3]2007-04-03 what about this: CREATE OR REPLACE PROCEDURE rssyncit1 IS location varchar2(255); BEGIN dbms_utility.exec_ddl_statement('alter database backup controlfile
30 April 2005 00:21 ashok_nr23 Messages: 30Registered: April 2005 Member Hi all, I have a query reg.overloading procedures. Will there be any problem if I try creating a procedure A with a parameter whose data type is varchar2 and another procedure with a parameter whose datatype is char. create or replace package pack1 is procedure A(var1 in varchar2); procedure B(var1 in char); end; / Awaiting response, Ashok. Report message to a moderator Re: Overloading procedures [message #117845 is a reply to message #117840] Sat, 30 April 2005 00:52 shibu.varghese Messages: 15Registered: April 2005 Location: Trivandrum Junior Member Yes it wont work as char & varchar2 are the same except for the fact 1 is of fixed size & the other depends on the size of the string. Report message to a moderator Re: Overloading procedures [message #118001 is a reply to message #117840] Mon, 02 May 2005 09:30 smartin Messages: 1803Registered: March 2005 Location: Jacksonville, Florida Senior Member Although oddly enough my test did actually compile. But then when I tried to call the procedures it had errors: PLS-00307: too many declarations of 'T1' match this call Report message to a moderator Re: Overloading procedures [message #118072 is a reply to message #118001] Mon, 02 May 2005 23:22 shibu.varghese Messages: 15Registered: April 2005 Location: Trivandrum Junior Member Thats y i said that it wont work. Regds, Shibu smartin wrote on Mon, 02 May 2005 20:00Although oddly enough my test did actually compile. But then when I tried to call the procedures it had errors: PLS-00307: too many declarations of 'T1' match this call Report message to a moderator Re: Overloading procedures [message #118179 is a reply to message #117840] Tue, 03 May 2005 09:15 smartin Messages: 1803Registered: March 2005 Location: Jacksonville, Florida Senior Member Oh I know, I just found it interesting that it actually compiled in the first place. And my test was in 10gR1, and I had plsql warnings set to enable:all and still no trouble. Report message to a moderator Re: Overloading procedures [message #118186 is a reply to message #117845] Tue, 03 May 2005 09:43 Maaher Messages: 7062Registered: December 2001 Senior Member shibu.varghese wrote on Sat, 30 April 2005 07:52Yes it wont work as char & varchar2 are the same except for the fact 1 is of fixed size & the other depends on the size of the string. They are not the same, Oracle just applies implicit casting, rename the input variable and you're out of trouble: SQL> create or replace package pack1 2 is 3 procedure A(vc_var1 in varchar2); 4 procedure A(chr_var1 in char); 5 end; 6 / Packag