ERROR PLS-00306
PL / SQL: Statement ignored
PLS-00306: incorrect number of types of arguments in call
to 'INCLUIR'
WHY?
PROCEDURE incluir(
p_id_frota_cliente IN OUT frota_cliente.id_frota_cliente%TYPE,
p_id_cliente IN frota_cliente.id_cliente%TYPE,
p_limite_mensal IN frota_cliente.limite_mensal%TYPE,
p_limite_trans IN frota_cliente.limite_trans%TYPE,
p_qtd_max_litros IN frota_cliente.qtd_max_litros%TYPE,
p_valor_max IN frota_cliente.valor_max%TYPE,
p_ver_agenda_condutor IN frota_cliente.ver_agenda_condutor%TYPE,
p_ver_km IN frota_cliente.ver_km%TYPE,
p_ver_valor_max IN frota_cliente.ver_valor_max%TYPE,
p_diaval_carta_credito IN frota_cliente.diaval_carta_credito%TYPE
IN OTHER PROCEDURE I CALL THE PROCEDURE ABOVE:
incluir(p_id_cliente => p_id_empresa);
Because you haven't got a variable to hold your IN OUT parameter (p_id_frota_cliente IN OUT frota_cliente.id_frota_cliente%TYPE).
Also, in order for IN parameters to be considered optional (OUT or IN OUT parameters can't be optional) you need to use the default clause to specify a value when one hasn't been provided.
Eg:
SQL> create or replace procedure test (p1 in varchar2,
2 p2 in varchar2)
3 is
4 begin
5 null;
6 end test;
7 /
Procedure created.
SQL>
SQL> begin
2 test(p1 => 'hi');
3 end;
4 /
test(p1 => 'hi');
ERROR at line 2:
ORA-06550: line 2, column 3:
PLS-00306: wrong number or types of arguments in call to 'TEST'
ORA-06550: line 2, column 3:
PL/SQL: Statement ignored
SQL>
SQL> create or replace procedure test (p1 in varchar2,
2 p2 in varchar2 default null)
3 is
4 begin
5 null;
6 end test;
7 /
Procedure created.
SQL>
SQL> begin
2 test(p1 => 'hi');
3 end;
4 /
PL/SQL procedure successfully completed.
Similar Messages
-
Error PLS-00306: wrong number or types of arguments in call to
I am getting the following Error when calling stored Procedure, I have tried with Last Parameter PRESULT and WITHOUT IT, it fails in both the instance.
=======================================================================
"System.Data.OracleClient.OracleException: ORA-06550: line 1, column 7:
PLS-00306: wrong number or types of arguments in call to 'UPDATECOTRACKING'
ORA-06550: line 1, column 7:
PL/SQL: Statement ignored
=======================================================================
signature of Stored Procedure is as follow
(pmaster_key IN sca_costtrackinglog.master_key%type,
pdoc_master_key IN sca_costtrackinglog.master_key%type,
pfrenumber IN sca_costtrackinglog.fre_number%type,
pnotice1 IN sca_costtrackinglog.notice1%type,
pnotice2 IN sca_costtrackinglog.notice2%type,
padditreceived IN sca_costtrackinglog.additreceived%type,
pfreanticipate IN sca_costtrackinglog.freanticipate%type,
pdateofnot IN sca_costtrackinglog.dateofnot%type,
pdateofmeeting IN sca_costtrackinglog.dateofmeeting%type,
psenttocontractor IN sca_costtrackinglog.senttocontractor%type,
pcouforexecution IN sca_costtrackinglog.couforexecution%type,
pcomments IN sca_costtrackinglog.comments%type,
pcreateby IN sca_costtrackinglog.createby%type,
peditby IN sca_costtrackinglog.editby%type,
presult OUT number) is
This is the Trace of Parameters from actual Call, that fails with above error.
Parameter Name : PMASTER_KEY(Input),Type(AnsiString) Size(26), Value = 000328JYA30008HSWBCK01NYC
Parameter Name : pdoc_master_key(Input),Type(AnsiString) Size(26), Value = 310657KLF30025HSWBCK01NYC
Parameter Name : PFRENUMBER(Input),Type(AnsiString) Size(12), Value = 00015
Parameter Name : PNOTICE1(Input),Type(DateTime) Size(1), Value = 3/25/2010
Parameter Name : PNOTICE2(Input),Type(DateTime) Size(1), Value =
Parameter Name : PADDITRECEIVED(Input),Type(DateTime) Size(1), Value =
Parameter Name : PFREANTICIPATE(Input),Type(DateTime) Size(1), Value =
Parameter Name : PDATEOFNOT(Input),Type(DateTime) Size(1), Value =
Parameter Name : PDATEOFMEETING(Input),Type(DateTime) Size(1), Value =
Parameter Name : PSENTTOCONTRACTOR(Input),Type(DateTime) Size(1), Value =
Parameter Name : pcouforexecution(Input),Type(DateTime) Size(1), Value =
Parameter Name : pcomments(Input),Type(AnsiString) Size(250), Value =
Parameter Name : PCREATEBY(Input),Type(AnsiString) Size(50), Value = NYCSCA\tmpns2
Parameter Name : PEDITBY(Input),Type(AnsiString) Size(50), Value = NYCSCA\tmpns2
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Below is the trace from Data.OracleClient.OracleCommandBuilder.DeriveParameters(Cmd)
Parameter Name : PMASTER_KEY(Input),Type(AnsiString) Size(2000), Value =
Parameter Name : PDOC_MASTER_KEY(Input),Type(AnsiString) Size(2000), Value =
Parameter Name : PFRENUMBER(Input),Type(AnsiString) Size(2000), Value =
Parameter Name : PNOTICE1(Input),Type(DateTime) Size(0), Value =
Parameter Name : PNOTICE2(Input),Type(DateTime) Size(0), Value =
Parameter Name : PADDITRECEIVED(Input),Type(DateTime) Size(0), Value =
Parameter Name : PFREANTICIPATE(Input),Type(DateTime) Size(0), Value =
Parameter Name : PDATEOFNOT(Input),Type(DateTime) Size(0), Value =
Parameter Name : PDATEOFMEETING(Input),Type(DateTime) Size(0), Value =
Parameter Name : PSENTTOCONTRACTOR(Input),Type(DateTime) Size(0), Value =
Parameter Name : PCOUFOREXECUTION(Input),Type(DateTime) Size(0), Value =
Parameter Name : PCOMMENTS(Input),Type(AnsiString) Size(2000), Value =
Parameter Name : PCREATEBY(Input),Type(AnsiString) Size(2000), Value =
Parameter Name : PEDITBY(Input),Type(AnsiString) Size(2000), Value =
Parameter Name : PRESULT(Output),Type(VarNumeric) Size(0), Value =
******************************************************************************************************************In the Oracle database, the body of the package FWA_PRI API, the procedure ValidatePri declares P_PriREc as being :
PAYMENT_REQUEST_IMPORT%ROWTYPE
As you can see above, the DoPri Procedure expects a type p_PriRec as its second argument.
Therefore in my procedure I do the following:
create or replace procedure spMatchPayment is
BEGIN
DECLARE
CURSOR StageCurs IS SELECT * FROM PAYMENT_REQUEST_IMPORT;
p_payment_req_import PAYMENT_REQUEST_IMPORT%ROWTYPE;
BEGIN
OPEN StageCurs();
LOOP
FETCH StageCurs INTO P_payment_req_import;
EXIT WHEN StageCurs%NOTFOUND;
fwa_pri.DoPri(NULL, fwa_pri.DoPri('M',P_PriRec => p_payment_req_import);
END LOOP;
CLOSE StageCurs;
END;
end spMatchPayment;
Now, when I am trying to compile I am getting the Compilation errors for PROCEDURE IMPACT.SPMATCHPAYMENT
Error: PLS-00306: wrong number or types of arguments in call to 'DOPRI'
Line: 16
Text: fwa_pri.DoPri(NULL,P_PriRec => p_payment_req_import);
I don't see what's wrong on my code......HELP!! -
Unable to generate the XML file through SQL script. getting error PLS-00306
I am fetching the data from cursor and generating the xml output I am getting the below error.
When I have checked the cursor query it is fetching the data in to single column.
Input truncated to 1 characters
Enter value for 7: EXEC FND_CONC_STAT.COLLECT;
DBMS_LOB.append (tmp_file, r.core_xml);
ERROR at line 95:
ORA-06550: line 95, column 7:
PLS-00306: wrong number or types of arguments in call to 'APPEND'
ORA-06550: line 95, column 7:
PL/SQL: Statement ignoredHi Alex,
thanks for the responce..
i have fixed the issue
i have used XMLAttributes to get the value
SELECT XMLELEMENT (
NAME "TranACK",
XMLAttributes ('1' as "TranNum",
(select distinct to_char(SYSDATE,'yyyy-mm-dd')
from DUAL) as "PrcDate"),
XMLFOREST (
a.PAYMENT_ID AS "PmtID"),
XMLFOREST (
a.ACK_TRANSACTION_RECEIVER AS "Name1"),
XMLFOREST (
to_char(a.VALUE_DATE,'yyyy-mm-dd') as "ValueDate" ),
XMLFOREST (
a.PAYMENT_AMOUNT AS "CurAmt"),
XMLFOREST (
a.CURRENCY_CODE AS "CurCode")
).getclobval ()
AS line_xml
FROM XXWAP_PAYMENT_LINE_TBL a
where a.PAYMENT_BATCH_ID=P_batch_id; -
Hi,
My Problem is when im adding dataset with stored procedure, im getting this error.
I Can access database,
Could not create a list of fields for the query. Verify that you can connect to the data source and that your query syntax is correct.
ORA-06550: line 1, column 7: PLS-00306: wrong number or types of arguments in call to 'PROCEDURE_NAME' ORA-06550: line 1, column 7: PL/SQL:
Statement ignored
stored procedure is simple select :
CREATE OR REPLACE PROCEDURE [PROCEDURE_NAME](L_CURSOR out SYS_REFCURSOR)
is
Begin
open L_CURSOR for
SELECT [columnname] FROM
[tablename]
End;
Configuration Details:
DB: Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64biOracle Developer Tools for Visual Studio Copyright (c) 2005,2014 SQL Server Data Tools Type: Oracle , Data Provider : .Net Framework Data Provider For OracleThe answer is of inside question. It is about provider. Change my provider ODTwithODAC for 10g (my database version). And problem resolved.
Thank you for your helps,
Regards,
Arda -
Error PLS-00306 during calling PL/SQL function from Java
Hi all,
I am facing a problem during call of oracle PL/SQL function from java using CallableStatement.
I receive following error message.
java.sql.SQLException: ORA-06550: line 1, column 13:
PLS-00306: wrong number or types of arguments in call to 'EXPORT_HIST_ALARMS_FUNC'
ORA-06550: line 1, column 7:
PL/SQL: Statement ignored
As per above error EXPORT_HIST_ALARMS_FUNC in oracle has this signature.
CREATE OR REPLACE FUNCTION EXPORT_HIST_ALARMS_FUNC(startDateTime VARCHAR2, endDateTime VARCHAR2, meType VARCHAR2) RETURN VARCHAR2 IS
END EXPORT_HIST_ALARMS_FUNC;
Above function I have called following way in java.
String sql = "begin ?:= EXPORT_HIST_ALARMS_FUNC(?, ?, ?); end;" ;
CallableStatement cStatement = null;
cStatement = connection.prepareCall(sql);
cStatement.registerOutParameter(1,Types.VARCHAR);
cStatement.setString(2,startDateTime);
cStatement.setString(3,endDateTime);
cStatement.setString(4,meType);
cStatement.execute();
msg = cStatement.getString(1);
Actually above function requires three input parameters and one return parameter.
During execution of above java code it throws SQLException and shows PLS-00306: wrong number or types of arguments in call to 'EXPORT_HIST_ALARMS_FUNC' error.
I have run this function directly from oracle with three parameters and run successfully and finally it returns string.
But I am unable to figure out why it doesn't run from above java code.
Please help regarding this.
Thanks.
Regards,
Shardul BankerTry this:
String sql = "begin ?:= EXPORT_HIST_ALARMS_FUNC(?, ?, ?); end;" ;
CallableStatement cStatement = null;
cStatement = connection.prepareCall(sql);
cStatement.registerOutParameter(1,Types.VARCHAR);
cStatement.setString(1,startDateTime);
cStatement.setString(2,endDateTime);
cStatement.setString(3,meType);
cStatement.execute();
msg = cStatement.getString(1);Regards,
Martijn Teigeler
Edited by: mTeigeler on Oct 13, 2007 10:22 AM -
Error : PLS-00306: wrong number or types of arguments
Hi,
I have created a function :
create or replace procedure Test11 AS
x Test.Emp_No%Type;
Begin
select emp_no into x from Test where name = 'Sud';
x := x + 1;
update Test set emp_no = x where emp_no < 100;
commit;
end Test11;
This has compiled successfully in PL/SQL Developer. Now, I have created an executable of this procedure in Front end - 11i. And then I have created a Program of this executable. Then I have added this program to a request group.
Now that I am running this request and I getting this error in the log :
ORACLE error 6550 in FDPSTP
Cause: FDPSTP failed due to ORA-06550: line 1, column 7:
PLS-00306: wrong number or types of arguments in call to 'TEST11'
ORA-06550: line 1, column 7:
PL/SQL: Statement ignored
.Hi,
Your procedure is a little confusing. By the way, this procedure has no parameters and I supose that maybe you are calling it with some parameter. Could you check this please?
Tip: post your code inside tags (start and end tag are the same) to proper formatting :)
Regards,
Edited by: Walter Fernández on Dec 3, 2008 10:53 AM - Adding tip... -
HELP: DEADLINE!!!! ERROR PLS-00306: WITH APPENDCHILD
I am new to this... any help is greatly appreciated..
set serveroutput on
CREATE OR REPLACE FUNCTION uf_buildWRDetail(pi_lWRNum IN NUMBER) RETURN VARCHAR2 IS
xmlDoc xmlDom.DOMDocument;
xmlDocOriginal xmlDom.DOMDocument;
xmlDocAddOn xmlDom.DOMDocument;
parserWRDetail xmlparser.Parser;
parserWRAssoc xmlparser.Parser;
parserTemp xmlparser.Parser;
xmlDocElementO xmlDom.DOMElement;
xmlDocElementA xmlDom.DOMElement;
el xmlDom.DOMElement;
xmlDOMList xmlDOM.DOMNodeList;
xmlDOMNodeO xmlDOM.DOMNode;
xmlDOMNodeA xmlDOM.DOMNode;
xmlNodeVal xmlDOM.DOMNode;
xmlNodeName xmlDOM.DOMNode;
docNodeROOT xmlDOM.DOMNode;
docNodeROWSET xmlDOM.DOMNode;
docNodeROW xmlDOM.DOMNode;
docNodeFIELD xmlDOM.DOMNode;
docNodeTEXT xmlDOM.DOMNode;
nodeAssocParty xmlDOM.DOMNode;
nodeAPROW xmlDOM.DOMNode;
xmlElement xmlDOM.DOMElement;
cWRDetail CLOB;
cWRAssoc CLOB;
sNodeName VARCHAR2(2000);
sNodeValue VARCHAR2(2000);
nodeCount NUMBER;
sTempOut VARCHAR2(32767);
temp2 varchar2(255);
BEGIN
--=======================================================================
-- MASTER OUT
--=======================================================================
parserTemp := xmlparser.newParser;
xmlparser.parseBuffer(parserTemp,'<ROWSET/>');
xmlDoc := xmlparser.getDocument(parserTemp);
xmldom.setVersion(xmlDoc, '1.0');
docNodeROOT := xmldom.makeNode(xmlDoc);
docNodeROWSET := xmldom.getLastChild(docNodeROOT);
el := xmldom.createElement(xmlDoc, 'ROW');
docNodeROW := xmldom.appendChild(docNodeROWSET, xmldom.makeNode(el));
--=======================================================================
-- WORK DETAIL
--=======================================================================
-- this function returns a clob with the standard ROWSET/ROW namings
--==============================================================================
select uf_getWRDetail(pi_lWRNum) into cWRDetail from dual;
--=============================================================================
parserWRDetail := xmlparser.newParser;
xmlparser.ParseCLOB(parserWRDetail, cWRDetail);
xmlDocOriginal := xmlparser.getDocument(parserWRDetail);
xmlDOMList := xmldom.getElementsByTagName(xmlDocOriginal, '*');
nodeCount := xmldom.getLength(xmlDOMList);
if nodeCount > 0 then
for i in 2..nodeCount-1 loop
xmlDOMNodeO := xmldom.item(xmlDOMList, i);
sNodeName := xmldom.getNodeName(xmlDOMNodeO);
xmlDOMNodeO := xmldom.getFirstChild(xmlDOMNodeO);
sNodeValue := xmldom.getNodeValue(xmlDOMNodeO);
docNodeFIELD := xmldom.makeNode(xmldom.createElement(xmlDoc, sNodeName));
docNodeTEXT := xmldom.makeNode(xmldom.createTextNode(xmlDoc, NVL(sNodeValue,' ')));
xmlNodeVal := xmldom.appendChild(docNodeROW, docNodeFIELD);
xmlNodeVal := xmldom.appendChild(docNodeFIELD, sNodeValue);
end loop;
end if;
--=======================================================================
-- WORK DETAIL END
--=======================================================================
-- TEMPORARILTY REMOVED...
--=======================================================================
-- ASSOCIATED PARTIES
--=======================================================================
-- select uf_getWRAssocParties(pi_lWRNum) into cWRAssoc from dual;
-- parserWRAssoc := xmlparser.newParser;
-- xmlparser.ParseCLOB(parserWRAssoc, cWRAssoc);
-- xmlDocAddOn := xmlparser.getDocument(parserWRAssoc);
-- xmlDOMList := xmldom.getElementsByTagName(xmlDocAddOn, '*');
-- nodeCount := xmldom.getLength(xmlDOMList);
-- if nodeCount > 0 then
-- el := xmldom.createElement(xmlDoc, 'ASSOCPARTIES');
-- nodeAssocParty := xmldom.appendChild(docNodeROW, xmldom.makeNode(el));
-- for i in 2..nodeCount-1 loop
-- el := xmldom.createElement(xmlDoc, 'ASSOCPARTIESROW');
-- nodeAPROW := xmldom.appendChild(nodeAssocParty, xmldom.makeNode(el));
-- xmlDOMNodeO := xmldom.item(xmlDOMList, i);
-- sNodeName := xmldom.getNodeName(xmlDOMNodeO);
-- xmlDOMNodeO := xmldom.getFirstChild(xmlDOMNodeO);
-- sNodeValue := xmldom.getNo deValue(xmlDOMNodeO);
-- docNodeFIELD := xmldom.makeNode(xmldom.createElement(xmlDoc, sNodeName));
-- docNodeTEXT := xmldom.makeNode(xmldom.createTextNode(xmlDoc, NVL(sNodeValue,' ')));
-- xmlNodeVal := xmldom.appendChild(nodeAPROW, docNodeFIELD);
-- xmlNodeVal := xmldom.appendChild(docNodeFIELD, sNodeValue);
-- end loop;
-- end if;
--=======================================================================
-- ASSOCIATED PARTIES END
--=======================================================================
xmldom.writeToBuffer(xmlDoc, sTempOut);
RETURN sTempOut;
END;
/Hello!
Please check Type and Number of Parameters of the called Procedure/Function
This is a common PL/SQL-Error, not an XML-specific one.
Bye and be blessed -
Got error pls-00306 wrongnumber or type of arguments in call to put_line .
1 create or replace procedure dispvalues(projsales_in number,year_in number,totsales number,lcost number) is
2 begin
3 dbms_output.put_line('total sales:'||to_char(nvl('totsales',year_in)/projsales_in*100),'999.99');
4 dbms_output.put_line('employee labor:'||to_char(nvl('lcost',year_in)/projsales_in*100),'999.99');
5 end;
This is the required code . .Hi,
Format your code so that you can see what arguments belong to what functions.
For example, the first call to put_line (as you wrote it, only formatted) is:
... dbms_output.put_line ( 'total sales:' || to_char ( nvl ( 'totsales'
, year_in
) / projsales_in * 100
, '999.99'
);Here, it's easy to see that you're calling put_line with 2 arguments, which is the "wrong number". Perhaps '999.99' should be an argument of TO_CHAR, not put_line:
... dbms_output.put_line ( 'total sales:' || to_char ( nvl ( 'totsales'
, year_in
) / projsales_in * 100'
, '999.99'
); -
PLS-00306: wrong number or types of arguments in call
Hi,
Oracle9i
created a procedure which will retrieve the records.
As the procedure is to only retrieve the records so it does not have any IN parameters
But on executing the procedure gets the below error:
PLS-00306: wrong number or types of arguments in call to 'GET_PRODUCT_DETAILS'
I have called the procedure as below:
=======================
Declare
v_cur ...%type;
BEGIN
Package_name.GET_PRODUCT_DETAILS(v_cur);
END;
Procedure Body
==========
create or replace PROCEDURE GET_PRODUCT_DETAILS( v_cur OUT Cursor)
is
begin
end;
/Try creating the procedure with the out parameter as sys_refcursor.
create or replace PROCEDURE GET_PRODUCT_DETAILS( v_cur OUT sys_refCursor)
And declare the variable in your outer block also as sys_refcursor.
Declare
v_cur sys_refcursor;
BEGIN
Package_name.GET_PRODUCT_DETAILS(v_cur);
END;
Of course this would require that your actual procedure GET_PRODUCT_DETAILS should have a statement like
" open V_cur for some select statement that you use to retrieve the records".
You could also create GET_PRODUCT_DETAILS with the same %type decalration which you use in the outer block
eg
create or replace PROCEDURE GET_PRODUCT_DETAILS( v_cur OUT x.y%type)
Declare
v_cur x.y%type;
BEGIN
Package_name.GET_PRODUCT_DETAILS(v_cur);
END;
/ -
PLS-00306: wrong number or types of arguments in call to 'TO_CHAR '
Hi guys, I am learning Pl/SQL. Trying to write a simple function which calculates some dates. It takes contract_date and determines the date of the following Sunday.
My code current has the compiler error: PLS-00306: wrong number or types of arguments in call to 'TO_CHAR 'which I believe has to do with the to_char(trunc(contract_date,'D')) := contract_weekday;
I do not understand what is wrong with my statement there..
Here is my code: Thanks for any help!
show errors
create or replace FUNCTION
contract_dates(contract_date IN DATE)
RETURN DATE
IS
starting_sunday DATE;
--ending_saturday DATE := starting_sunday + 6;
contract_weekday varchar(32);
days_add NUMBER;
BEGIN
to_char(trunc(contract_date,'D')) := contract_weekday;
case contract_weekday
when 1 then days_add := 6;
when 2 then days_add := 5;
when 3 then days_add := 4;
when 4 then days_add := 3;
when 5 then days_add := 2;
when 6 then days_add := 1;
else days_add := 7;
end case;
starting_sunday := contract_date + days_add;
RETURN to_date(starting_sunday);
END;It's the other way around:
CREATE OR REPLACE FUNCTION
contract_dates(contract_date IN DATE)
RETURN DATE
IS
starting_sunday DATE;
--ending_saturday DATE := starting_sunday + 6;
contract_weekday varchar(1);
days_add NUMBER;
BEGIN
contract_weekday := to_char(trunc(contract_date,'D'));
case contract_weekday
when 1 then days_add := 6;
when 2 then days_add := 5;
when 3 then days_add := 4;
when 4 then days_add := 3;
when 5 then days_add := 2;
when 6 then days_add := 1;
else days_add := 7;
end case;
starting_sunday := contract_date + days_add;
RETURN to_date(starting_sunday);
END; -
Replicating a standard Oracle API giving PLS-00306: wrong number or types
I have replicated standard Oracle API to customize it and call it from an external procedure.
When I am calling the customized API, it is giving me '[Error] PLS-00306 (3484: 16): PLS-00306: wrong number or types of arguments in call to 'PICK_RELEASE'' error.
I am pretty sure that I am passing proper parameter values to the customized API call.
Is there any thing I am missing here or is there any restriction on package which is not letting me use the standard API?
Thank you,996060 wrote:
I have replicated standard Oracle API to customize it and call it from an external procedure.
When I am calling the customized API, it is giving me '[Error] PLS-00306 (3484: 16): PLS-00306: wrong number or types of arguments in call to 'PICK_RELEASE'' error.
I am pretty sure that I am passing proper parameter values to the customized API call.
Is there any thing I am missing here or is there any restriction on package which is not letting me use the standard API?
Thank you,Have you reviewed the suggested solutions in (OERR: PLS-306 wrong number or types of arguments in call to '%s' [ID 27323.1])?
Thanks,
Hussein -
PLS-00306: wrong number or types of arguments in call to 'proc1'
Hi All,
I pass OUT paramter values to .NET as in below proc.
PROCEDURE PROC1
in_report_parameter_id IN report_tasks.report_task_id%TYPE,
result_site_name OUT SYS_REFCURSOR,
result OUT SYS_REFCURSOR
AS
my_site_id sites.site_id%TYPE;
my_lane_numbers_string VARCHAR(100);
my_site_name sites.short_name%TYPE;
BEGIN
my_site_id := get_site_id(in_report_parameter_id);
SELECT short_name
INTO my_site_name
FROM sites
WHERE site_id = my_site_id;
OPEN result_site_name FOR
SELECT my_site_name site_name
FROM sys.dual;
OPEN result FOR
SELECT site_direction_id,
site_lane_id
FROM site_lanes
JOIN report_parameters
ON site_lane_id = CAST(report_parameters.report_parameter_value AS NUMBER)
WHERE site_id = my_site_id
AND report_parameters.report_parameter_id = in_report_parameter_id
AND report_parameters.report_parameter_group = 'LANE'
AND report_parameters.report_parameter_name = 'LANE'
ORDER BY site_direction_id ASC, site_lane_id ASC;
-- FROM SYS.DUAL;
END PROC1;During runtime it throws me the following error
PLS-00306: wrong number or types of arguments in call to 'proc1'how could i solve this ?
Thanks in advance.
Regards,
IndhuHi, Indhu,
user10641405 wrote:
PROCEDURE PROC1
in_report_parameter_id IN report_tasks.report_task_id%TYPE,
result_site_name OUT SYS_REFCURSOR,
result OUT SYS_REFCURSOR
AS ...During runtime it throws me the following error
PLS-00306: wrong number or types of arguments in call to 'proc1'how could i solve this ?Call proc1 with the right number and types of arguments.
The first argument is an IN argument, so it can be any kind of expression, including a literal or a function call.
The second and third arguments are OUT arguments, so they must be variables.
If you need more help, post the code that calls proc1 (and causes the error).
Make sure you include the part of the code where the arguments are declared.
I'm innocent of .net, so I probably won't be able to help you with that part, but it will be important for anyone who does know .net.
By the way, is there a reason why you are using a SYS_REFCURSOR for result_site_name, when it will only return one row? A lot of folks would make the datatype of that argument sites.short_name%TYPE. -
PLS-00306: wrong number or types of arguments in call to 'Test'
Hi,
I have problem in my package .. here i will give the sample code .. can u please help me to solve
i have
create or replace package TEST is
PROCEDURE WRITE_FILE();
end TEST;
CREATE OR REPLACE PACKAGE BODY TEST IS
TYPE TY_TIPE IS TABLE OF VARCHAR2(120) INDEX BY BINARY_INTEGER;
FUNCTION GET_COLLECTION(IN_INPUT IN VARCHAR2) RETURN TY_TIPE AS
V_TYPE TY_TIPE;
BEGIN
-- SOME OPERATION AND FINALLY
RETURN V_TYPE
END GET_COLLECTION;
PROCEDURE WRITE_FILE() AS
V_TYPE TY_TIPE;
BEGIN
V_TYPE:=GET_COLLECTION('test');
END WRITE_FILE;
END TEST;
At the line in bold .. am getting error "PLS-00306: wrong number or types of arguments in call to 'GET_COLLECTION'" like this
Please help me out
Regards
Prabu.pNo, it is not syntactically fine:
SQL> create or replace package TEST is
2
3 PROCEDURE WRITE_FILE();
4 end TEST;
5
6 /
Warning: Package created with compilation errors.
SQL> show error
Errors for PACKAGE TEST:
LINE/COL ERROR
3/22 PLS-00103: Encountered the symbol ")" when expecting one of the
following:
<an identifier> <a double-quoted delimited-identifier>
current
SQL>
SQL>
SQL> CREATE OR REPLACE PACKAGE BODY TEST IS
2
3 TYPE TY_TIPE IS TABLE OF VARCHAR2(120) INDEX BY BINARY_INTEGER;
4
5 FUNCTION GET_COLLECTION(IN_INPUT IN VARCHAR2) RETURN TY_TIPE AS
6
7 V_TYPE TY_TIPE;
8
9 BEGIN
10
11 -- SOME OPERATION AND FINALLY
12
13 RETURN V_TYPE
14
15 END GET_COLLECTION;
16
17 PROCEDURE WRITE_FILE() AS
18
19 V_TYPE TY_TIPE;
20
21 BEGIN
22
23 V_TYPE:=GET_COLLECTION('test');
24 END WRITE_FILE;
25
26 END TEST;
27 /
Warning: Package Body created with compilation errors.
SQL>
SQL>
SQL> show error
Errors for PACKAGE BODY TEST:
LINE/COL ERROR
15/1 PLS-00103: Encountered the symbol "END" when expecting one of the
following:
. ( * @ % & = - + ; < / > at in is mod remainder not rem
<an exponent (**)> <> or != or ~= >= <= <> and or like LIKE2_
LIKE4_ LIKEC_ between || multiset member SUBMULTISET_
The symbol ";" was substituted for "END" to continue.
17/22 PLS-00103: Encountered the symbol ")" when expecting one of the
following:
<an identifier> <a double-quoted delimited-identifier>
current
SQL> This means that you posted some different code that you actually use,... how do you expect help if you don't show us what you have? -
PLS-00306: wrong number or types of arguments in call to 'P_MAIN' ORA-06550
I have 2 environments: a development environment and a production environment. Both have the same package.
Calling the package from APEX in the production environment it gives a error:PLS-00306: wrong number or types of arguments in call to 'P_MAIN' ORA-06550.but the data is stille be saved.
But calling the package in development environment nothing happened.
What can be the problem???
regards,
ekasThat's not what he asked: is it possible that a package with the same name exists in another schema on the production server - also is it possible that an synonym for the package exists in the production server which doesn't exist in the development? =>All synonym that exist in the production database also exist in the developmenst database.
Also, you haven't provided details of how you performed these tests to establish that one works where the other doesn't. Are you testing the package within the context of an apex application or have you isolated any test case to the PL/SQL code only - could you run a test of the package within something like SQL*Plus (or your favourite IDE)? Are you feeding in identical test data? Indeed, do you have a unit test script which you can run on both development and production?
=> I have test the package in the content of a apex application, and the data in the production enviroment is not the same as in the developement enviroment due to real data in production. -
I have written the following anonymous block. It has a cursor "cur_total_tckt" which select 6 columns. A nested table "total_tckt_colcn" is declared of type "cur_total_tckt". In the dbms_output.put_line I want to print each element of my collection. It is giving me the following error :
PLS-00306: wrong number or types of arguments in call to 'PUT_LINE'
ORA-06550: line 29, column 2:
PL/SQL: Statement ignored
06550. 00000 - "line %s, column %s:\n%s"
I want to print all the 6 columns of an element for 366 such elements.
DECLARE
CURSOR cur_total_tckt
is
select t.ticket_id ticket_id, t.created_date created_date, t.created_by created_by, t.ticket_status ticket_status,
t.last_changed last_changed, h.created_date closed_date
from n01.cc_ticket_info t
inner join n01.cc_ticket_status_history h
on (t.ticket_id = h.ticket_id)
where t.last_changed >= '6/28/2012 17:28:59' and t.last_changed < (sysdate + interval '1' day);
type total_tckt_colcn
is
TABLE OF cur_total_tckt%rowtype;
total_tckt_col total_tckt_colcn;
total_coach_col total_tckt_colcn;
begin
total_tckt_col := total_tckt_colcn ();
total_coach_col := total_tckt_colcn ();
OPEN cur_total_tckt;
loop
fetch cur_total_tckt bulk collect into total_tckt_col limit 100;
dbms_output.put_line(total_tckt_col.last);
FOR i IN total_tckt_col.first..total_tckt_col.last
loop
-- dbms_output.put_line(total_tckt_col(i).ticket_id); -- this line works
dbms_output.put_line(total_tckt_col(i)); -- this line gives error
END LOOP;
exit
WHEN (cur_total_tckt%NOTFOUND);
END LOOP ;
CLOSE cur_total_tckt;
end;No, it wont allow to display two values ,
Other wise we can do ,to display two values by giving separately DBMS_output as shown below.it wont give u ia single row , it will give in row by row.
DECLARE
CURSOR cur_total_tckt
IS
SELECT empno, ename FROM emp;
TYPE total_tckt_colcn IS TABLE OF cur_total_tckt%ROWTYPE;
total_tckt_col total_tckt_colcn;
total_coach_col total_tckt_colcn;
BEGIN
total_tckt_col := total_tckt_colcn ();
total_coach_col := total_tckt_colcn ();
OPEN cur_total_tckt;
LOOP
FETCH cur_total_tckt BULK COLLECT INTO total_tckt_col LIMIT 100;
DBMS_OUTPUT.put_line (total_tckt_col.LAST);
FOR i IN total_tckt_col.FIRST .. total_tckt_col.LAST
LOOP
DBMS_OUTPUT.put_line (total_tckt_col (i).empno);
DBMS_OUTPUT.put_line (total_tckt_col (i).ename);
END LOOP;
EXIT WHEN (cur_total_tckt%NOTFOUND);
END LOOP;
CLOSE cur_total_tckt;
END;
Out put:
12
1236
kenny
2
jhon
1
menies
3
sony
4
endy
5
dennies
1
wolks
2
flora
3
teady
4
furry
5
kune
6
zoel
Cheers!
Maybe you are looking for
-
Possible to combine purchased book files from desktop and laptop?
When my original Win 7 computer started having problems, I consolidated all the iTunes files (music, books, video) on that computer and stored the backup on a thumb drive per instructions on the Apple support site, with the idea of putting them on a
-
Photoshop lost connection to ESTK
I had a crash in PS while running a jsx script. After the crash, ESTK does not list Photoshop as a target application anymore, and I cannot recover the connection. Things I've tried: - restart the machine (Vista 32b) - delete the preferences of both
-
Sony dvd-rw dru-820a ata device on Windows 8
sao paulo, (Brazil), January 26, 2013. Hi ! I´ve just converted my computer to Windows 8 and the Drive SONY DVD RW DRU-820A ATA DEVICE is not OPERATING any more ! Would you pleas help ? We need the computer for working purposes. Thanks, jose gonçalve
-
Help need in select statement?
Hi experts... I have an internal table with 2 records...i_mara with fields matnr and ersda matnr ersda 2345 01/26/2007 3445 02/05/2007 i need to write a select statement to collect all MBLNR from MKPF table where BUDAT is in between 01/26/200
-
DVCPRO HD 720P: pixel aspect ratios with still images from Final Cut
I am currently trying to get still images from a trailer I am working on with Final cut pro. The footage is DVCPRO HD 720P 24pn and the interlacing and pixel aspect ratios have been giving me a lot of trouble in photoshop. I am able to convert the PA