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