Attention Todd Barry or Andrew [message #40690] |
Thu, 31 October 2002 02:26 |
Madhan G
Messages: 7 Registered: October 2002
|
Junior Member |
|
|
if I try to execute
declare
l_job number;
begin
dbms_job.submit(l_job,'create or replace procedure ret(inp in number) is begin null;end;');
end;
/
at SQL prompt I was getting the following error
ERROR at line 1:
ORA-06550: line 1, column 93:
PLS-00103: Encountered the symbol "CREATE" when expecting one of the following:
begin declare exit for goto if loop mod null pragma raise
return select update while <an identifier>
<a double-quoted delimited-identifier> <a bind variable> <<
close current delete fetch lock insert open rollback
savepoint set sql execute commit forall
<a single-quoted SQL string>
ORA-06512: at "SYS.DBMS_JOB", line 79
ORA-06512: at "SYS.DBMS_JOB", line 131
ORA-06512: at line 4
If I try to execute from the front end. I was getting the following error.
ORA-20201 is the raise exception given by me.
ORA-20201: ORA-06550: line 1, column 93: PLS-00103: Encountered the symbol "CREATE" when expecting one of the following: begin declare exit for goto if loop mod null pragma raise return select update while <an identifier> <a double-quoted delimited-identifier> <a bind variable> << close current delete fetch lock insert open rollback savepoint set sql execute commit forall <a single-quoted SQL string> ORA-06512: at "BOEING.APPLT_MAINT_CP_SP", line 243 ORA-06512: at line 1 .
So please suggest a solution.
|
|
|
Re: Attention Todd Barry or Andrew [message #40697 is a reply to message #40690] |
Thu, 31 October 2002 09:23 |
andrew again
Messages: 2577 Registered: March 2000
|
Senior Member |
|
|
try this:
-- from dba account
grant create procedure to scott;
-- from scott
declare
l_job number;
begin
dbms_job.submit(l_job,'execute immediate '' create or replace procedure aaa2(inp in number) is begin null;end;'';');
end;
/
commit;
|
|
|