Home » SQL & PL/SQL » SQL & PL/SQL » How to update based on dependency? (merged 3)
How to update based on dependency? (merged 3) [message #387621] Fri, 20 February 2009 01:34 Go to next message
laknar
Messages: 22
Registered: February 2009
Junior Member
Requirement is i have 10 jobs in a table
every day 10pm i have to run all the 10 jobs.

first five jobs there is no dependency i have to update as RUN only if the status is WAIT.
if any of the jobs failed i have to update as FAILED

if all the five jobs completed successfully then update next 3 jobs as RUN, only if the status is WAIT.

if the 3 jobs completed successfully.then update as RUN the last 2 jobs only if the status is WAIT.

if any of the jobs failed in first five.how can i rerun only the failed job.Note : user will update manually WAIT if it is failedif i update failed job into WAIT then it should update as RUN for the failed job alone.

Jobname Status

a.sql STATUS
b.sql STATUS
c.sql STATUS
d.sql STATUS
e.sql STATUS
f.sql STATUS
g.sql STATUS
h.sql STATUS
i.sql STATUS
j.sql STATUS
Re: How to update based on dependency? [message #387625 is a reply to message #387621] Fri, 20 February 2009 01:41 Go to previous messageGo to next message
aviva4500
Messages: 122
Registered: July 2008
Location: bangalore
Senior Member
@Laknar,

Requirement is i have 10 jobs in a table


First tell us what have you tried so far?

Please read OraFAQ Forum Guide, especially "How to format your post?" section.
Make sure that lines of code do not exceed 80 characters when you format. 
Indent the code (See SQL Formatter), use code tags and align the columns in result.
Use the "Preview Message" button to verify.
Also always post your Oracle version (4 decimals).
Use SQL*Plus and copy and paste your session instead of describing it.


http://www.orafaq.com/forum/t/88153/0/
Please read & follow Posting Guideline as stated in URL above



Regards,
Hammer.

[Updated on: Fri, 20 February 2009 01:46]

Report message to a moderator

Re: How to update based on dependency? [message #387627 is a reply to message #387625] Fri, 20 February 2009 01:47 Go to previous messageGo to next message
Littlefoot
Messages: 20891
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
What has he done so far? Asked for another opinion at dBforums.
Re: How to update based on dependency? (merged 3) [message #387647 is a reply to message #387621] Fri, 20 February 2009 03:19 Go to previous messageGo to next message
Michel Cadot
Messages: 64103
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator

STOP SPAMMING THE FORUM WITH THE SAME QUESTION.

Regards
Michel
Re: How to update based on dependency? (merged 3) [message #387738 is a reply to message #387647] Fri, 20 February 2009 07:45 Go to previous messageGo to next message
laknar
Messages: 22
Registered: February 2009
Junior Member
sorry. i tried to update the post again and again
due to network problem i thought the query is not posted.
actually i was trying with IF ELSE Statement and FOR LOOP
list of jobs contains in a table with job number.i will post quickly what i have tried so far.
Re: How to update based on dependency? (merged 3) [message #387744 is a reply to message #387738] Fri, 20 February 2009 08:02 Go to previous messageGo to next message
Michel Cadot
Messages: 64103
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
laknar wrote on Fri, 20 February 2009 14:45
sorry. i tried to update the post again and again
due to network problem i thought the query is not posted.


So you posted the same question 4 times over 2 hours without checking it is in the forum or not?

Regards
Michel

Re: How to update based on dependency? (merged 3) [message #387763 is a reply to message #387744] Fri, 20 February 2009 08:46 Go to previous messageGo to next message
laknar
Messages: 22
Registered: February 2009
Junior Member
apologize Michel.im new to this forum.i was searched the post but im not able to find.
Re: How to update based on dependency? (merged 3) [message #387765 is a reply to message #387621] Fri, 20 February 2009 08:51 Go to previous message
BlackSwan
Messages: 25035
Registered: January 2009
Location: SoCal
Senior Member
http://www.dbforums.com/oracle/
Previous Topic: Materialize hint strange behavior (?) (merged 7)
Next Topic: DBLINK performance over sybase (merged)
Goto Forum:
  


Current Time: Sat Dec 03 20:02:02 CST 2016

Total time taken to generate the page: 0.08547 seconds