Home » SQL & PL/SQL » SQL & PL/SQL » Spot the error
Spot the error [message #228940] Wed, 04 April 2007 10:48 Go to next message
ziggy25
Messages: 206
Registered: July 2005
Senior Member

p_job:=0;

DBMS_JOB.submit(p_job,'PCK_ADMIN_SCHEDULER.schedule_billing_errors_report('''||job_name_in||''','||p_job||','||job_id_rec.id_number||');', 
            trunc(sysdate,'HH24')+((floor(to_number(to_char(sysdate,'MI'))/5)+1)*5)/(24*60),
            null,
            false); 



Why is it that when PCK_ADMIN_SCHEDULER.schedule_billing_errors_report runs, p_pjob is always 0? i expect p_job to be updated when the job is submited to dbms_job.

p_job is populated during the submit and is also sent into the procedure as one of the parameters.
Thanks

[Updated on: Wed, 04 April 2007 10:49]

Report message to a moderator

Re: Spot the error [message #228944 is a reply to message #228940] Wed, 04 April 2007 10:57 Go to previous messageGo to next message
Michel Cadot
Messages: 64103
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
p_job is always 0 because you build your string BEFORE SUBMIT call and p_job is affected DURING submit call.

Use:
DBMS_JOB.submit(p_job,'PCK_ADMIN_SCHEDULER.schedule_billing_errors_report('''||job_name_in||''',job,'||job_id_rec.id_number||');', 
            trunc(sysdate,'HH24')+((floor(to_number(to_char(sysdate,'MI'))/5)+1)*5)/(24*60),
            null,
            false); 

Regards
Michel
Re: Spot the error [message #228948 is a reply to message #228944] Wed, 04 April 2007 11:02 Go to previous message
ziggy25
Messages: 206
Registered: July 2005
Senior Member
ah.. yes of course.


Thank you.
Previous Topic: moths and dates
Next Topic: Connection problem (network adapter cannot establish the connection) (Merged)
Goto Forum:
  


Current Time: Sat Dec 03 20:07:30 CST 2016

Total time taken to generate the page: 0.03722 seconds