Home » SQL & PL/SQL » SQL & PL/SQL » Execute dbms_scheduler.enable from variable
Execute dbms_scheduler.enable from variable [message #269911] Tue, 25 September 2007 02:11 Go to next message
tomk
Messages: 17
Registered: March 2006
Junior Member
hi all,

I have a problem while executing this PL/SQL block:
declare
query varchar2(100);

begin

query := 'DBMS_SCHEDULER.enable (''tomk.job_test_name'')';

execute immediate query;

end;

I get an error :
ORA-00900: invalid SQL statement
ORA-06512: at line 13


how to execute it? unfortunatelly I have to put 'DBMS_SCHEDULER.enable ...' into variable :/

Thanks in advance
Re: Execute dbms_scheduler.enable from variable [message #269916 is a reply to message #269911] Tue, 25 September 2007 02:18 Go to previous message
Michel Cadot
Messages: 64152
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
enclose it between BEGIN and END to make it a PL/SQL block.

query := 'BEGIN DBMS_SCHEDULER.enable (''tomk.job_test_name'');END;';

Regards
Michel

Previous Topic: Sqlplus running too long
Next Topic: Error Handling
Goto Forum:
  


Current Time: Sat Dec 10 03:26:27 CST 2016

Total time taken to generate the page: 0.08447 seconds