Home » SQL & PL/SQL » SQL & PL/SQL » Unable to execute the procedure
Unable to execute the procedure [message #575891] Mon, 28 January 2013 23:07 Go to next message
rashidlatif
Messages: 7
Registered: January 2013
Junior Member
while trying to execute this

declare ret_val number;
begin
exec p_buildinfo('252657020001', to_date('20120820','YYYYMMDD'),to_date('20120928','YYYYMMDD'),ret_val, 0);
DBMS_OUTPUT.PUT_LINE('Value Returned Is : '||ret_val) ;
end;

I getting the below error


ORA-06550: line 3, column 10:
PLS-00103: Encountered the symbol "P_BUILDINFO" when expecting one of the following:

:= . ( @ % ;
The symbol ":=" was substituted for "P_BUILDINFO" to continue.




the procedure structure is

CREATE OR REPLACE
PROCEDURE p_buildsinfo ( var_p_cod CHAR := NULL,
var_p_dat_from DATE := NULL,
var_p_dat_to DATE := NULL,
po_var_l_nxt_seq IN OUT NUMBER,
var_p_consol_flg NUMBER default 0
)


can you please tell what am I doning wrong?
Re: Unable to execute the procedure [message #575892 is a reply to message #575891] Mon, 28 January 2013 23:11 Go to previous messageGo to next message
BlackSwan
Messages: 22526
Registered: January 2009
Senior Member
Please read and follow the forum guidelines, to enable us to help you:

http://www.orafaq.com/forum/t/88153/0/


what is complete PROCEDURE p_buildsinfo?

was PROCEDURE p_buildsinfo successfully created?
Re: Unable to execute the procedure [message #575893 is a reply to message #575892] Mon, 28 January 2013 23:13 Go to previous messageGo to next message
rashidlatif
Messages: 7
Registered: January 2013
Junior Member
yes it was createed successfully and is being used by other applications as well.
Re: Unable to execute the procedure [message #575894 is a reply to message #575893] Mon, 28 January 2013 23:16 Go to previous messageGo to next message
BlackSwan
Messages: 22526
Registered: January 2009
Senior Member
declare ret_val number;
begin
p_buildinfo('252657020001', to_date('20120820','YYYYMMDD'),to_date('20120928','YYYYMMDD'),ret_val, 0);
DBMS_OUTPUT.PUT_LINE('Value Returned Is : '||ret_val) ;
end;

what results when you do as above?
Re: Unable to execute the procedure [message #575895 is a reply to message #575894] Mon, 28 January 2013 23:19 Go to previous messageGo to next message
rashidlatif
Messages: 7
Registered: January 2013
Junior Member
it gives me below error

ORA-06550: line 3, column 10:
PLS-00103: Encountered the symbol "P_BUILDINFO" when expecting one of the following:

:= . ( @ % ;
The symbol ":=" was substituted for "P_BUILDINFO" to continue.

Re: Unable to execute the procedure [message #575897 is a reply to message #575895] Mon, 28 January 2013 23:27 Go to previous messageGo to next message
BlackSwan
Messages: 22526
Registered: January 2009
Senior Member
>yes it was createed successfully and is being used by other applications as well.
Please post proof that above is true
Re: Unable to execute the procedure [message #575898 is a reply to message #575897] Mon, 28 January 2013 23:32 Go to previous messageGo to next message
rashidlatif
Messages: 7
Registered: January 2013
Junior Member
9:30:28 Start Script Execution ...
9:30:28 **** SCRIPT STARTED: 29-Jan-2013 9:30:28 ****
9:30:28 CREATE OR REPLACE
9:30:28 PROCEDURE p_buildinfo ( var_p_cod_no CHAR := NULL,
9:30:28 ...
9:30:29 SQL statement executed
9:30:29 **** SCRIPT ENDED 29-Jan-2013 9:30:29 ****
9:30:29 End Script Execution
9:30:57 Transaction Committed
Re: Unable to execute the procedure [message #575899 is a reply to message #575898] Mon, 28 January 2013 23:34 Go to previous messageGo to next message
rashidlatif
Messages: 7
Registered: January 2013
Junior Member
can you please describe the error? is my syntax incorrect?
Re: Unable to execute the procedure [message #575902 is a reply to message #575899] Tue, 29 January 2013 00:05 Go to previous messageGo to next message
Littlefoot
Messages: 19329
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Connect to the database using SQL*Plus. Then run code (Black Swan suggested), like this:
SQL> DECLARE
  2     ret_val   NUMBER;
  3  BEGIN
  4     p_buildinfo ('252657020001',
  5                  TO_DATE ('20120820', 'YYYYMMDD'),
  6                  TO_DATE ('20120928', 'YYYYMMDD'),
  7                  ret_val,
  8                  0);
  9     DBMS_OUTPUT.PUT_LINE ('Value Returned Is : ' || ret_val);
 10  END;
 11  /
   p_buildinfo ('252657020001',
   *
ERROR at line 4:
ORA-06550: line 4, column 4:
PLS-00201: identifier 'P_BUILDINFO' must be declared
ORA-06550: line 4, column 4:
PL/SQL: Statement ignored


SQL>

Copy/paste the WHOLE SQL*Plus session over here, just like I did. (In my case, that code failed because I don't have the procedure - this was just an example, but we'd like to see YOUR results).
Re: Unable to execute the procedure [message #575904 is a reply to message #575902] Tue, 29 January 2013 00:18 Go to previous messageGo to next message
rashidlatif
Messages: 7
Registered: January 2013
Junior Member
SQL> declare ret_val number;
2 begin
3 exec p_buildstmtinfo('252657020001', to_date('20120820','YYMMDD'),ret_val, 0);
4 DBMS_OUTPUT.PUT_LINE('Value Returned Is : '||ret_val) ;
5 end;/
6 /
exec p_buildstmtinfo('252657020001', to_date('20120820','YYYYMM
*
ERROR at line 3:
ORA-06550: line 3, column 10:
PLS-00103: Encountered the symbol "P_BUILDSTMTINFO" when expecting
following:
:= . ( @ % ;
The symbol ":=" was substituted for "P_BUILDSTMTINFO" to continue.
ORA-06550: line 5, column 5:
PLS-00103: Encountered the symbol "/" The symbol "/" was ignored.
Re: Unable to execute the procedure [message #575905 is a reply to message #575904] Tue, 29 January 2013 00:20 Go to previous messageGo to next message
Littlefoot
Messages: 19329
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Where did you see EXEC in my code?
Re: Unable to execute the procedure [message #575907 is a reply to message #575905] Tue, 29 January 2013 00:24 Go to previous messageGo to next message
rashidlatif
Messages: 7
Registered: January 2013
Junior Member
I tried without EXEC as well, still the same.


I can not post the code because of the confidentiality.
Re: Unable to execute the procedure [message #575908 is a reply to message #575907] Tue, 29 January 2013 00:48 Go to previous messageGo to next message
Littlefoot
Messages: 19329
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Quote:
I tried without EXEC as well, still the same.

I'd like to see it, please. Copy/paste your SQL*Plus session.
Re: Unable to execute the procedure [message #575909 is a reply to message #575907] Tue, 29 January 2013 00:55 Go to previous messageGo to next message
Michel Cadot
Messages: 58612
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Also, Please read How to use [code] tags and make your code easier to read.
Make sure that lines of code do not exceed 80 characters when you format.
Indent the code and use code tags.
Use the "Preview Message" or "Preview Quick Reply" button to verify.
Also always post your Oracle version, with 4 decimals.

Regards
Michel
Re: Unable to execute the procedure [message #575912 is a reply to message #575904] Tue, 29 January 2013 01:23 Go to previous message
flyboy
Messages: 1769
Registered: November 2006
Senior Member
Quote:
exec p_buildinfo('252657020001', to_date('20120820','YYYYMMDD'),to_date('20120928','YYYYMMDD'),ret_val, 0);
...
PROCEDURE p_buildsinfo ( var_p_cod CHAR := NULL,
...
9:30:28 PROCEDURE p_buildinfo ( var_p_cod_no CHAR := NULL,
...
3 exec p_buildstmtinfo('252657020001', to_date('20120820','YYMMDD'),ret_val, 0);

I just wonder how exactly is your procedure P_BUILD%INFO named. You should secondly (right after omitting EXEC) check correct spelling of its name and use it afterwards.
select object_type, object_name from user_objects
where object_name like 'P\_BUILD%INFO' escape '\';
Previous Topic: Procedure Working But Not Solving Mutating Table
Next Topic: Help on creating master and detail relationship
Goto Forum:
  


Current Time: Tue Jul 29 20:20:23 CDT 2014

Total time taken to generate the page: 0.09297 seconds