Advertisement

02.24.2007 at 01:31PM PST, ID: 22411350
[x]
Attachment Details

Oracle - loop through 2 tables

Asked by badtz7229 in Oracle Database

Tags: ,

Hi,

I need help writing a script that will allow me to loop thru 2 cursor and update a record.
the issue is if a status = 81 and required_date is not null then look at the history_table for that particular record and loop thru its history to check if it contained a status = 94 with a required_date before the status was changed to 81.
 then update both the history_table and actual_table to set the required_date to null.

this is what i've got so far;

CURSOR cur_first_Cursor is
Select formno, ID
From  actual_table
Where status= 81 and required_date  is not null ;

CURSOR cur_second_cursor
Select  formno, ID
From  history_table
order by stamped_date asc;

begin

FOR  

for  cur_actual_table  in cur_first_Cursor LOOP

//here I have the problem record
//i don't know how to link the actual_table with history_table and loop thru history_table using the 2 cursors i created.

END LOOP;
end;



any help would be greatly appreciated.
thanks in advacne


Start Free Trial
[+][-]02.24.2007 at 02:49PM PST, ID: 18603233

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]02.24.2007 at 03:33PM PST, ID: 18603354

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]02.24.2007 at 11:25PM PST, ID: 18604380

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]02.25.2007 at 04:10AM PST, ID: 18604801

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]02.25.2007 at 07:33AM PST, ID: 18605219

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]02.26.2007 at 12:07AM PST, ID: 18607771

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]02.26.2007 at 04:31AM PST, ID: 18608548

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]02.26.2007 at 05:29AM PST, ID: 18608840

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]03.05.2007 at 06:20PM PST, ID: 18659076

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zone: Oracle Database
Tags: oracle, loop
Sign Up Now!
Solution Provided By: badtz7229
Participating Experts: 4
Solution Grade: B
 
 
[+][-]04.11.2007 at 07:18AM PDT, ID: 18889823

Experts Exchange has a courteous staff of administrators who help members get the most out of the website by means of administrative comments like this one.

Start your 7-day free trial to view this Administrative Comment or ask the Experts your question.

 
[+][-]04.15.2007 at 08:28AM PDT, ID: 18913860

Experts Exchange has a courteous staff of administrators who help members get the most out of the website by means of administrative comments like this one.

Start your 7-day free trial to view this Administrative Comment or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32