Home » SQL & PL/SQL » SQL & PL/SQL » Pls -000306
icon11.gif  Pls -000306 [message #275809] Mon, 22 October 2007 14:45 Go to next message
boris1610
Messages: 5
Registered: October 2007
Junior Member
Hi every one
I have created a procedure ASY.EUTR_CVS with these arguments:

create or replace procedure ASY.EUTR_CSV(
arg_startdate     gen.sad_asmt_date%TYPE,
arg_enddate       gen.sad_asmt_date%TYPE,
arg_filename      gen.sadmanif_nber%TYPE
)
AS

cursor c_data

IS 

the procedure is created but when i try to execute ASY.EUTR_CVS
i get:
Error at line 1
ORA-06550 line 1, column 7:
[b]PLS-000306: wrong number or types of arguments in call to EUTR_CSV[/b]
ORA-06550 line 1, column 7:
PL/SQL: Statement ignore


I'm working with oracle 10g end I.m new in this can somebody make me wise in this error?????
Re: Pls -000306 [message #275843 is a reply to message #275809] Tue, 23 October 2007 00:37 Go to previous messageGo to next message
Frank
Messages: 7880
Registered: March 2000
Senior Member
Show us (copy-paste) how you try to call the procedure.
also, do a desc of gen.
Re: Pls -000306 [message #275848 is a reply to message #275809] Tue, 23 October 2007 01:07 Go to previous messageGo to next message
Michel Cadot
Messages: 64103
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Fix the type or number of parameters you gave when you call the procedure.

Please read and follow OraFAQ Forum Guide, especially "How to format your post?" section.
Make sure that lines of code do not exceed 80 characters when you format. Use the "Preview Message" button.
Please always post your Oracle version (4 decimals).

Regards
Michel
Re: Pls -000306 [message #275984 is a reply to message #275843] Tue, 23 October 2007 10:01 Go to previous messageGo to next message
boris1610
Messages: 5
Registered: October 2007
Junior Member
I hope this is what can help you, help me out of this error

regards

Alfonso F Jansen
Re: Pls -000306 [message #275987 is a reply to message #275809] Tue, 23 October 2007 10:14 Go to previous messageGo to next message
MarcL
Messages: 455
Registered: November 2006
Location: Connecticut, USA
Senior Member
How could you expect help when you refuse to post the code you are using to call this procedure ?
Re: Pls -000306 [message #276095 is a reply to message #275984] Tue, 23 October 2007 23:23 Go to previous messageGo to next message
Frank
Messages: 7880
Registered: March 2000
Senior Member
boris1610 wrote on Tue, 23 October 2007 17:01

I hope this is what can help you, help me out of this error

If you want us to help you that desperate, then why don't you answer either of my two very simple questions?
Re: Pls -000306 [message #281390 is a reply to message #275987] Fri, 16 November 2007 11:30 Go to previous messageGo to next message
boris1610
Messages: 5
Registered: October 2007
Junior Member
Hi sorry for the delay, but being new in this I could not understand what you mean with code to call the procedure. I,m trying so far as possible to do a self study. Now I understand about the code. but it's little by little.

So here is the code(see attachemant) but I'm still stumbling because I,m getting the following error:

ORA-06550: line 13, column 60:
PLS-00103: Encountered the symbol "MM" when expecting one of the following:
) , * & | = - + < / > at in is mod remainder not rem => ..
<an exponent (**)> <> or != or ~= >= <= <> and or like LIKE2_
LIKE4_ LIKEC_ between || multi
ORA-06550: line 13, column 68:
PLS-0


Can you tel me wath I doing wrong to fix the code?????

regards

alfonso
Re: Pls -000306 [message #281391 is a reply to message #275809] Fri, 16 November 2007 11:44 Go to previous messageGo to next message
BlackSwan
Messages: 25036
Registered: January 2009
Location: SoCal
Senior Member

SQL> set term on echo on
SQL> declare
  2    v_job_no   number;
  3  begin
  4    dbms_job.submit( v_job_no,
  5  DECLARE
  6  extrac_file_name varchar2(27);
  7  StartDate date;
  8  EndDate date;
  9  
 10  BEGIN
 11  
 12  select ''EXTR_''||to_char(trunc(add_months(sysdate, -1), ''MM''),''mmyy'')||''.txt'' into  extrac_file_name from dual;
 13  select to_char(trunc(add_months(sysdate, -1), ''MM''),''dd-Mon-yyyy'') into StartDate from dual;
 14  select to_char(trunc(sysdate, ''MM'') - 1,''dd-Mon-yyyy'') into EndDate from dual;
 15  
 16    ops$asy.EUTR_CSV(TO_DATE(StartDate,''dd-Mon-yyyy''),TO_DATE(EndDate,''dd-Mon-yyyy''),extrac_file_name );
 17  
 18  EXCEPTION
 19  WHEN OTHERS THEN
 20    dbms_output.put_line(SubStr(''Error ''||TO_CHAR(SQLCODE)||'': ''||SQLERRM, 1, 255));
 21  RAISE;
 22  END;
 23  , TRUNC(LAST_DAY(SYSDATE) + 1), 'TRUNC(LAST_DAY(SYSDATE) + 1)');
 24    commit;
 25  end;
 26  /
DECLARE
*
ERROR at line 5:
ORA-06550: line 5, column 1:
PLS-00103: Encountered the symbol "DECLARE" when expecting one of the
following:
( - + case mod new not null others <an identifier>
<a double-quoted delimited-identifier> <a bind variable> avg
count current exists max min prior sql stddev sum variance
execute forall merge time timestamp interval date
<a string literal with character set specification>
<a number> <a single-quoted SQL string> pipe
<an alternatively-quoted string literal with character set specification>
<an alternati
ORA-06550: line 12, column 15:
PLS-00103: Encountered the symbol "" when expecting one of the following:
, from into bulk
The symbol "," was substituted for "" to continue.
ORA-06550: line 12, column 60:
PLS-00103: Encountered the symbol "MM" when expecting one of the following:
) , * & | = - + < / > at in is mod remainder not rem => ..
<an exponent (**)> <> or != or ~= >= <= <> and or like LIKE2_
LIKE4_ LIKEC_ between || multi
ORA-06550: line 12, column 68:
PLS-0



>select ''EXTR_''||to_char(trunc(add_months(sysdate, -1), ''MM''),''mmyy'')||''.txt'' into extrac_file_name from dual;
Correct invalid syntax in line above
Re: Pls -000306 [message #281393 is a reply to message #281391] Fri, 16 November 2007 12:04 Go to previous messageGo to next message
boris1610
Messages: 5
Registered: October 2007
Junior Member
Hi how are you .
You are telling me to correct the invalid syntax, but I don,t see what is wrong with the syntax Give me a hint

regards

alfonso
Re: Pls -000306 [message #281397 is a reply to message #275809] Fri, 16 November 2007 12:16 Go to previous messageGo to next message
BlackSwan
Messages: 25036
Registered: January 2009
Location: SoCal
Senior Member
select ''EXTR_''||to_char(trunc(add_months(sysdate, -1), ''MM''),''mmyy'')||''.txt''  from dual
              *
ERROR at line 1:
ORA-00923: FROM keyword not found where expected

If you can not figure out simple syntax errors, perhaps you should only use POINT & CLICK GUIs.
Re: Pls -000306 [message #281399 is a reply to message #281397] Fri, 16 November 2007 12:34 Go to previous messageGo to next message
boris1610
Messages: 5
Registered: October 2007
Junior Member

I,m very grateful for the help you have offer me.

yours very sincerely

regards

alfonso
Re: Pls -000306 [message #281401 is a reply to message #281391] Fri, 16 November 2007 12:55 Go to previous message
joy_division
Messages: 4640
Registered: February 2005
Location: East Coast USA
Senior Member
Here's a little more more:

start_date and end_dates are already dates according to your script, therefore you should not use TO_DATE on them.

In Oracle, we use single quotes, and only once, to mark off strings.
Previous Topic: Populate Ref Cursor
Next Topic: dynamic copy with PLSQL
Goto Forum:
  


Current Time: Sun Dec 04 06:21:08 CST 2016

Total time taken to generate the page: 0.09833 seconds