SSRS Calling a Stored Procedure error : PLS-00306: wrong number or types of arg...
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 Oracle
The 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
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!! -
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... -
Calling procedure over dblink - PLS-00306: wrong number or types of args
Getting the above error when calling a procedure residing in a package on another database over a link.
The arguments are an object and, a table of objects. The variables being passed are based on objects declared locally that look exactly like the ones the procedure is expecting.
I haven't done this before so - I'm not sure what the issue is. The execute privilege has been granted on the dependent objects remotely as well as locally. I don't know what else to try and, I have not had any luck looking for a similiar issue online. Please help.Thanks but - before doing that I just wanted to see if someone can review this and see if this is my problem:
http://download-west.oracle.com/docs/cd/B10501_01/appdev.920/a96594/adobjbas.htm#466038
We are using objects declared on the remote database. And, my variables I'm passing are of reference to exact copies on the host. But, from what I understand from the link above - you can't use object types across links. I'm completely lost as to whether this is the issue or not. It seems like a fairly obscure topic as far as documentation goes. If this is the issue however - what is the way around it? We are loading a table of objects with 40,000 plus rows of data to pass to a procedure remotely. If we can't pass the object type - how do we get the rows to the procedure (and, we aren't against modifying the remote procedure - just need to know the best method).
Thanks in advance for your time - help. -
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 '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 '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; -
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! -
PLS-00306 wrong number or types of arguments in call to 'procedure'
now i am using oracle10g xe , i get the following error
create or replace procedure proc_name(slno_in in number,
name_out out varchar2,fee_out out number)
is
v_name student.name%type;
v_fee student.fee%type;
begin
select name,fee into v_name,v_fee from
student where slno=slno_in;
name_out := v_name;
fee_out := v_fee;
end proc_ref;
Procedure created.
SQL> exec proc_name(1);
BEGIN proc_ref(1); END;
ERROR at line 1:
ORA-06550: line 1, column 7:
PLS-00306: wrong number or types of arguments in call to 'PROC_REF'
ORA-06550: line 1, column 7:
PL/SQL: Statement ignored
please help meYou have a procedure with three arguments
>
create or replace procedure proc_name(slno_in in number,
name_out out varchar2,fee_out out number)You then call it by providing one argument
>
SQL> exec proc_name(1);
BEGIN proc_ref(1); END;
You get an error saying wrong number of arguments.
PLS-00306: wrong number or types of arguments in call to 'PROC_REF'
ORA-06550: line 1, column 7:
PL/SQL: Statement ignored
I don't see how it can be any clearer, call the procedure with three arguments.
var string varchar2(100)
var num number
exec proc_ref(1, :string, :num) -
PLS-00306: wrong number or types of arguments in call to . Error Help
I have create a algorithm which The member function at the end, returns xc and yc.
ERROR at line 9:
ORA-06550: line 9, column 63:
PLS-00306: wrong number or types of arguments in call to 'o'
ORA-06550: line 9, column 2:
PL/SQL: Statement ignoredGuess your function has: RETURN NUMBER
If so, the statement RETURN 'True' will give you exactly that error.
Also:
Return xc;
Return yc;
does not work as intended. The function will end by returning xc. (If it ever makes it that far) -
Pl. help debug - PLS-00306: wrong number or types of arguments in call
Hi,
I am trying to create a wrapper function to all a procedure in Oracle EBusiness Suite 11i.
When I compile the following code
==========
CREATE OR REPLACE PROCEDURE gme.KIL_ProcessAlloc IS
vFileName VARCHAR2(30) := '1006251.csv';
vLoc VARCHAR2(20) := '/u041/applmgr/opm/opmappl/utllog';
v_InHandle utl_file.file_type;
vNewLine VARCHAR2(1000);
vLineNo PLS_INTEGER;
c1 PLS_INTEGER;
c2 PLS_INTEGER;
c3 PLS_INTEGER;
c4 PLS_INTEGER;
c5 PLS_INTEGER;
c6 PLS_INTEGER;
c7 PLS_INTEGER;
c8 PLS_INTEGER;
c9 PLS_INTEGER;
c10 PLS_INTEGER;
c11 PLS_INTEGER;
c12 PLS_INTEGER;
c13 PLS_INTEGER;
c14 PLS_INTEGER;
c15 PLS_INTEGER;
c16 PLS_INTEGER;
c17 PLS_INTEGER;
c18 PLS_INTEGER;
c19 PLS_INTEGER;
c20 PLS_INTEGER;
c21 PLS_INTEGER;
c22 PLS_INTEGER;
c23 PLS_INTEGER;
c24 PLS_INTEGER;
c25 PLS_INTEGER;
c26 PLS_INTEGER;
c27 PLS_INTEGER;
c28 PLS_INTEGER;
c29 PLS_INTEGER;
c30 PLS_INTEGER;
c31 PLS_INTEGER;
c32 PLS_INTEGER;
c33 PLS_INTEGER;
c34 PLS_INTEGER;
TYPE AllocArray IS TABLE OF GME_INVENTORY_TXNS_GTMP%ROWTYPE
INDEX BY BINARY_INTEGER;
l_Allocdata AllocArray;
TYPE MtlDetailArray IS TABLE OF gme_material_details%ROWTYPE
INDEX BY BINARY_INTEGER;
l_MtlDetaildata MtlDetailArray;
TYPE xTranArray IS TABLE OF GME_INVENTORY_TXNS_GTMP%ROWTYPE
INDEX BY BINARY_INTEGER;
l_xtrandata xTranArray;
TYPE defTranArray IS TABLE OF GME_INVENTORY_TXNS_GTMP%ROWTYPE
INDEX BY BINARY_INTEGER;
l_deftrandata defTranArray;
t_messagecount number;
t_messagelist varchar2(10000);
t_returnstatus varchar2(1);
BEGIN
v_InHandle := utl_file.fopen(vLoc, vFileName, 'r');
vLineNo := 1;
LOOP
BEGIN
utl_file.get_line(v_InHandle, vNewLine);
EXCEPTION
WHEN NO_DATA_FOUND THEN
EXIT;
END;
vNewLine := TRANSLATE(vNewLine, 'A''', 'A');
c1 := INSTR(vNewLine, ',', 1,1);
c2 := INSTR(vNewLine, ',', 1,2);
c3 := INSTR(vNewLine, ',', 1,3);
c4 := INSTR(vNewLine, ',', 1,4);
c5 := INSTR(vNewLine, ',', 1,5);
c6 := INSTR(vNewLine, ',', 1,6);
c7 := INSTR(vNewLine, ',', 1,7);
c8 := INSTR(vNewLine, ',', 1,8);
c9 := INSTR(vNewLine, ',', 1,9);
c10 := INSTR(vNewLine, ',', 1,10);
c11 := INSTR(vNewLine, ',', 1,11);
c12 := INSTR(vNewLine, ',', 1,12);
c13 := INSTR(vNewLine, ',', 1,13);
c14 := INSTR(vNewLine, ',', 1,14);
c15 := INSTR(vNewLine, ',', 1,15);
c16 := INSTR(vNewLine, ',', 1,16);
c17 := INSTR(vNewLine, ',', 1,17);
c18 := INSTR(vNewLine, ',', 1,18);
c19 := INSTR(vNewLine, ',', 1,19);
c20 := INSTR(vNewLine, ',', 1,20);
c21 := INSTR(vNewLine, ',', 1,21);
c22 := INSTR(vNewLine, ',', 1,22);
c23 := INSTR(vNewLine, ',', 1,23);
c24 := INSTR(vNewLine, ',', 1,24);
c25 := INSTR(vNewLine, ',', 1,25);
c26 := INSTR(vNewLine, ',', 1,26);
c27 := INSTR(vNewLine, ',', 1,27);
c28 := INSTR(vNewLine, ',', 1,28);
c29 := INSTR(vNewLine, ',', 1,29);
c30 := INSTR(vNewLine, ',', 1,30);
c31 := INSTR(vNewLine, ',', 1,31);
c32 := INSTR(vNewLine, ',', 1,32);
c33 := INSTR(vNewLine, ',', 1,33);
c34 := INSTR(vNewLine, ',', 1,34);
-- l_allocdata(vLineNo).sourceno := SUBSTR(vNewLine,1,c1-1);
-- l_allocdata(vLineNo).sizeno := SUBSTR(vNewLine,c1+1,c2-c1-1);
-- l_allocdata(vLineNo).status := SUBSTR(vNewLine,c2+1,c3-c2-1);
-- l_allocdata(vLineNo).latitude := SUBSTR(vNewLine,c3+1,c4-c3-1);
-- l_allocdata(vLineNo).longitude := SUBSTR(vNewLine,c4+1,c5-c4-1);
-- l_allocdata(vLineNo).testfor := SUBSTR(vNewLine,c5+1);
l_allocdata(vLineNo).trans_id := SUBSTR(vNewLine,1,c1-1);
l_allocdata(vLineNo).item_id := SUBSTR(vNewLine,c1+1,c2-c1-1);
l_allocdata(vLineNo).co_code := SUBSTR(vNewLine,c2+1,c3-c2-1);
l_allocdata(vLineNo).orgn_code := SUBSTR(vNewLine,c3+1,c4-c3-1);
l_allocdata(vLineNo).whse_code := SUBSTR(vNewLine,c4+1,c5-c4-1);
l_allocdata(vLineNo).lot_id := SUBSTR(vNewLine,c5+1,c6-c5-1);
l_allocdata(vLineNo).location := SUBSTR(vNewLine,c6+1,c7-c6-1);
l_allocdata(vLineNo).doc_id := SUBSTR(vNewLine,c7+1,c8-c7-1);
l_allocdata(vLineNo).doc_type := SUBSTR(vNewLine,c8+1,c9-c8-1);
l_allocdata(vLineNo).doc_line := SUBSTR(vNewLine,c9+1,c10-c9-1);
l_allocdata(vLineNo).line_type := SUBSTR(vNewLine,c10+1,c11-c10-1);
l_allocdata(vLineNo).reason_code := SUBSTR(vNewLine,c11+1,c12-c11-1);
l_allocdata(vLineNo).trans_date := SUBSTR(vNewLine,c12+1,c13-c12-1);
l_allocdata(vLineNo).trans_qty := SUBSTR(vNewLine,c13+1,c14-c13-1);
l_allocdata(vLineNo).trans_qty2 := SUBSTR(vNewLine,c14+1,c15-c14-1);
l_allocdata(vLineNo).qc_grade := SUBSTR(vNewLine,c15+1,c16-c15-1);
l_allocdata(vLineNo).lot_status := SUBSTR(vNewLine,c16+1,c17-c16-1);
l_allocdata(vLineNo).trans_stat := SUBSTR(vNewLine,c17+1,c18-c17-1);
l_allocdata(vLineNo).trans_um := SUBSTR(vNewLine,c18+1,c19-c18-1);
l_allocdata(vLineNo).trans_um2 := SUBSTR(vNewLine,c19+1,c20-c19-1);
l_allocdata(vLineNo).completed_ind := SUBSTR(vNewLine,c20+1,c21-c20-1);
l_allocdata(vLineNo).staged_ind := SUBSTR(vNewLine,c21+1,c22-c21-1);
l_allocdata(vLineNo).gl_posted_ind := SUBSTR(vNewLine,c22+1,c23-c22-1);
l_allocdata(vLineNo).event_id := SUBSTR(vNewLine,c23+1,c24-c23-1);
l_allocdata(vLineNo).text_code := SUBSTR(vNewLine,c24+1,c25-c24-1);
l_allocdata(vLineNo).transaction_no := SUBSTR(vNewLine,c25+1,c26-c25-1);
l_allocdata(vLineNo).action_code := SUBSTR(vNewLine,c26+1,c27-c26-1);
l_allocdata(vLineNo).material_detail_id := SUBSTR(vNewLine,c27+1,c28-c27-1);
l_allocdata(vLineNo).organization_id := SUBSTR(vNewLine,c28+1,c29-c28-1);
l_allocdata(vLineNo).locator_id := SUBSTR(vNewLine,c29+1,c30-c29-1);
l_allocdata(vLineNo).subinventory := SUBSTR(vNewLine,c30+1,c31-c30-1);
l_allocdata(vLineNo).alloc_um := SUBSTR(vNewLine,c31+1,c32-c31-1);
l_allocdata(vLineNo).alloc_qty := SUBSTR(vNewLine,c32+1,c33-c32-1);
l_allocdata(vLineNo).def_trans_ind := SUBSTR(vNewLine,c33+1,c34-c33-1);
vLineNo := vLineNo+1;
END LOOP;
utl_file.fclose(v_InHandle);
FOR i IN 1..vLineNo-1 loop
GME_API_PUB.insert_line_allocation (
1,
100,
FALSE,
True,
l_allocdata(i),
null,
null,
false,
false,
false,
l_MtlDetailData,
l_xtrandata,
l_deftrandata,
t_messagecount,
t_messagelist,
t_returnstatus);
end loop;
IF (t_returnstatus <> 'S') THEN
for i IN 1 .. t_messagecount LOOP
dbms_output.put_line('The text is '||FND_MSG_PUB.get(i,t_messagelist));
END LOOP;
END IF;
-- COMMIT;
EXCEPTION
WHEN OTHERS THEN
RAISE;
END KIL_ProcessAlloc;
===============
I get this
Warning: Procedure created with compilation errors.
SQL> sho err
Errors for PROCEDURE GME.KIL_PROCESSALLOC:
LINE/COL ERROR
145/8 PLS-00306: wrong number or types of arguments in call to
'INSERT_LINE_ALLOCATION'
145/8 PL/SQL: Statement ignored
=================
The package specs of GME_API_PU is under:
===============
PROCEDURE insert_line_allocation (
p_api_version IN NUMBER := gme_api_pub.api_version
,p_validation_level IN NUMBER := gme_api_pub.max_errors
,p_init_msg_list IN BOOLEAN := FALSE
,p_commit IN BOOLEAN := FALSE
,p_tran_row IN gme_inventory_txns_gtmp%ROWTYPE
,p_lot_no IN VARCHAR2 DEFAULT NULL
,p_sublot_no IN VARCHAR2 DEFAULT NULL
,p_create_lot IN BOOLEAN DEFAULT FALSE
,p_ignore_shortage IN BOOLEAN DEFAULT FALSE
,p_scale_phantom IN BOOLEAN DEFAULT FALSE
,x_material_detail OUT gme_material_details%ROWTYPE
,x_tran_row OUT gme_inventory_txns_gtmp%ROWTYPE
,x_def_tran_row OUT gme_inventory_txns_gtmp%ROWTYPE
,x_message_count OUT NUMBER
,x_message_list OUT VARCHAR2
,x_return_status OUT VARCHAR2);
GME_API_PUB.insert_line_allocation
===========
What am I doing wrong...why am I getting PLS-00306.
Can someone help?
Thank you
Sundar
[email protected]Hi John,
Thanks a ton - a nice Christmas gift. Thank you for being a Santa :-).
I used the same subscript as the one used for in parameter and the procedure compiled without errors.
A corollary: If (any of the) Out parameter is null (all columns of the row/array), will the array row element still be stored ? May be I cross the bridge when I come to it.
Merry Christmas.
Sundar -
PLS-00306: wrong number or types of arguments in call to 'myStoredProc'
I don't understand why I get the below error when I run my stored proc like this (here is the signature of my stored proc
PROCEDURE myStoredProc(thisCursor OUT MyRefCur);
exec myStoredProc
Error starting at line 1 in command:
exec myStoredProc
Error report:
ORA-06550: line 1, column 7:
PLS-00306: wrong number or types of arguments in call to 'myStoredProc'
ORA-06550: line 1, column 7:
PL/SQL: Statement ignored
06550. 00000 - "line %s, column %s:\n%s"
*Cause: Usually a PL/SQL compilation error.
*Action:Hi,
Suzie wrote:
I don't understand why I get the below error when I run my stored proc like this (here is the signature of my stored proc
PROCEDURE myStoredProc(thisCursor OUT MyRefCur);So the procedure requires 1 argument.
exec myStoredProcand you're calling it with 0 arguments. That's the wrong number. Call the procedure with 1 arguement:
VARIABLE c REFCURSOR
EXEC myStoredProc (:c); -
PLS-00306: wrong number or types of arguments in call to 'PROC_GET_CUSTOMER
i'm trying to pass multiple value to stored procedure and getting below error
CREATE OR REPLACE TYPE STRINGTABLE AS TABLE OF VARCHAR2(4000);
CREATE OR REPLACE
PACKAGE PKG_CUSTOMER AS
TYPE L_CURSOR IS REF CURSOR;
PROCEDURE PROC_GET_CUSTOMER( P_SEARCH in STRINGTABLE, SELECTALL OUT L_CURSOR);
END PKG_CUSTOMER ;
CREATE OR REPLACE
PACKAGE BODY PKG_CUSTOMER AS
PROCEDURE PROC_GET_CUSTOMER( P_SEARCH IN STRINGTABLE, SELECTALL OUT L_CURSOR) IS
BEGIN
OPEN SELECTALL FOR
SELECT PTNR_COUNTRY_CODE, COUNT(*) NOS FROM TAB_MHD_PARTNER
WHERE PTNR_COUNTRY_CODE in (SELECT * FROM TABLE (P_SEARCH))
GROUP BY PTNR_COUNTRY_CODE
END;
END PKG_CUSTOMER;
EXEC PKG_CUSTOMER.PROC_GET_CUSTOMER('GB','DE');
Error starting at line 30 in command:
EXEC PKG_CUSTOMER.PROC_GET_CUSTOMER('GB','DE')
Error report:
ORA-06550: line 1, column 7:
PLS-00306: wrong number or types of arguments in call to 'PROC_GET_CUSTOMER'
ORA-06550: line 1, column 7:
PLS-00306: wrong number or types of arguments in call to 'PROC_GET_CUSTOMER'
ORA-06550: line 1, column 43:
PLS-00363: expression 'DE' cannot be used as an assignment target
ORA-06550: line 1, column 7:
PL/SQL: Statement ignored
06550. 00000 - "line %s, column %s:\n%s"
*CAUSE: USUALLY A PL/SQL COMPILATION ERROR.
*Action:Edited by: RamiahRAGU on Apr 15, 2012 11:08 AMThe way you are calling the packaged procedure is entirely wrong.
1. You have one IN parameter which is of table type, and you are trying to pass it as VARCHAR2.
2. You have an out parameter, and not passing it.
Moreover, what are you trying to achieve by this code? If you explain teh actual issue, we will be able to help.
You should call the procedure as below:
SQL> declare
2 lc_csr PKG_CUSTOMER.L_CURSOR;
3 begin
4 PKG_CUSTOMER.PROC_GET_CUSTOMER(STRINGTABLE('GB','DE'),lc_csr);
5 end;
6 /
PL/SQL procedure successfully completed.
Maybe you are looking for
-
Difference between semantic and key fields in DSO
Hello All, Please help me in understanding about difference between "Key fields" and "Semantic key" in write optimize DSO. thanks
-
I got this message. What does it mean? Warning: SUID file "System/Library/CoreServices/RemoteManagement/ARDAgent.app/Contents/MacOS/ARDAg ent" has been modified and will not be repaired.
-
CSS Runs in Design, But Not Live
I added a CSS definition to "repeat-x" a 1px background image in DW CS4. I uploaded the page to my site and everything worked fine. After making a few additional changes (none to the CSS that I remember), the page stills displays correctly in design
-
Won't start after update to 3.6.6 Mac OSX 10.6.4
Have updated to 3.6.6. on OSX 10.6.4. Installed as per instructions, but FF does not start - from the application folder or the dock (to where I dragged the FF icon). From looking at the support forum there seems to a number of people experiencing th
-
Enlarge feature, combination doesn't work with wireless keyboard
Hi When I use my wireless keyboard (I also have one with wire and numeric pad: no problems here), I can't use the feature to enlarge text and images. It works from the Safari menu and it works when in the tools bar (modified) I use the A symbol. The