Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> A job for two cursors?

A job for two cursors?

From: Ubiquitous <weberm_at_polaris.net>
Date: Tue, 07 Oct 2003 21:29:44 -0500
Message-ID: <RZidnfm5bpIF6x6iU-KYuA@comcast.com>


I have a situation I am pondering the solution to without much success. Maybe someone can offer some pointers. :-)

I have a table containing itemized transactions (Fee Detail) and another containing a summary records of these transactions that came from a bank (Closeout). I wish to build records in a third table based on the summary table, then add the itemized lines to it (pulled from the itemized table. The tables would look something like this (yes, I know it's not normalized *grin*):

Closeout:
Key
summary information
etc

Fee Detail:
Key
Line
Line information

Itemized
Key
Line
Summary information
Line information

How is the best way to go about doing this?

I am thinking of using a cursor FOR LOOP to insert the new Closeout rows into the third table (as line 1), then using a second cursor within that loop to pull the associated rows from Fee Detail and then insert them as lines 2 thru whatever, inside of an innner curser FOR LOOP. Does this sound reasonable or am I making things far too complicated?

-- 
======================================================================
ISLAM: Winning the hearts and minds of the world, one bomb at a time.
Received on Tue Oct 07 2003 - 21:29:44 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US