| Unable to execute the procedure [message #575891] |
Mon, 28 January 2013 23:07  |
 |
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 #575902 is a reply to message #575899] |
Tue, 29 January 2013 00:05   |
 |
Littlefoot
Messages: 16993 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 #575912 is a reply to message #575904] |
Tue, 29 January 2013 01:23  |
flyboy
Messages: 1670 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 '\';
|
|
|
|