how to update multiple existing records based on New record

Post questions here relative to DataStage Server Edition for such areas as Server job design, DS Basic, Routines, Job Sequences, etc.

Moderators: chulett, rschirm, roy

Post Reply
harithay
Participant
Posts: 106
Joined: Tue Dec 14, 2004 10:51 pm

how to update multiple existing records based on New record

Post by harithay »

Hi all,


i need to update existing records based on new incoming records.

i am taking existing records into hash file.

matching key columns are fund_name , fund_number.

Hi,

i am uisng look up with fund_name , fund_number. when i take existing records into hash file , i get only one record (with fund_name, fund_number).

so i am able to update one record .

my scenraio is there may be more than one record in existing database.

what is the solution to update other reords with (fund_name, fund_number)


Thanks
Sainath.Srinivasan
Participant
Posts: 3337
Joined: Mon Jan 17, 2005 4:49 am
Location: United Kingdom

Post by Sainath.Srinivasan »

You need to either include an additional col / attribute as key. Alternatively try to merge keys in a single row - which is not recommended.
Sainath.Srinivasan
Participant
Posts: 3337
Joined: Mon Jan 17, 2005 4:49 am
Location: United Kingdom

Post by Sainath.Srinivasan »

If the question is only with reference to target db update, you can leave it as it is and let the db update multiple rows for the same key.
harithay
Participant
Posts: 106
Joined: Tue Dec 14, 2004 10:51 pm

Post by harithay »

Hi sainath,
Thanks for ur reply.
i am trying to develop with Merge Stage, that is the reason i have posted
'job aborting in merging of two files'
(recently in other post ),

i don't have other key column in table other than those two fund_name, fund_no.

is there any other way to solve this problem.

Sainath.Srinivasan wrote:You need to either include an additional col / attribute as key. Alternatively try to merge keys in a single row - which is not recommended.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

there may be more than one record in existing database
A hashed file is based on a primary key lookup. A primary key equality constraint can only ever return one row.

You may need two separate lookups against the same hashed file, if you have two different fund identifiers.

Otherwise, the Hashed File stage is not the appropriate stage type for your lookup; you need a lookup against either the target table itself or against a copy of relevant columns from it pre-loaded into a UV table (for example) or database table.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Post Reply