Multiple Inserts on UDB For a Single Record

Post questions here relative to DataStage Enterprise/PX Edition for such areas as Parallel job design, Parallel datasets, BuildOps, Wrappers, etc.

Moderators: chulett, rschirm, roy

Post Reply
Marley777
Premium Member
Premium Member
Posts: 316
Joined: Tue Jan 27, 2004 3:26 pm

Multiple Inserts on UDB For a Single Record

Post by Marley777 »

I have a situation where I am reading in a sequential file and for each record read I need to insert multiple rows in UDB database based on a match from the key in the sequential file.

i.e....

Read Seq file
Select from DB where DB.col1 = Seq File.col1
For each row returned insert new row in same table

What I am attempting to do is the COBOL equivalent of declaring a cursor and fetching the rows returned if that helps.

Thanks in advance.
sudarshan
Participant
Posts: 11
Joined: Fri Jun 17, 2005 7:41 am

Re: Multiple Inserts on UDB For a Single Record

Post by sudarshan »

Hey,

One simple way of achieving this is by using a lookup stage and putting the condition u have specified as the lookup condition and then dropping the lookup failures.

:)
Sudarshan
Post Reply