oracle update option

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
kirankota79
Premium Member
Premium Member
Posts: 315
Joined: Tue Oct 31, 2006 3:38 pm

oracle update option

Post by kirankota79 »

I have a scenario like the following:

emplid name_type name

12345 PRI John doe
12345 PRI John King


I need to apply same conversion routine to name column, then it becomes like this

emplid name_type name

12345 PRI Kodf urt
12345 PRI Kodf fkgk



emplid and name_type are columns that i am using to update. The data is written to dataset and iam using dataset to update the same oracle table. Now how will the datastage updates the table. Does it updates with two different values or it updates to the same value?

Thanks
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

It does whatever you ask it to do. But "it" here is not DataStage - DataStage simply sends the data to the database in an "UPDATE" context. If the primary key is the same, the row is the same. This is stock standard SQL behaviour - nothing at all to do with DataStage and how it works.

If the primary key consists of more than these two columns, then each update will update all rows that have these two columns with the indicated values. To update a single row you must specify the entire key (that is, all column values in the primary key).

You seem to be attempting to obfuscate data. How are you effecting the conversion - a simple character map (stage variables?) or a custom routine or buildop?
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
keshav0307
Premium Member
Premium Member
Posts: 783
Joined: Mon Jan 16, 2006 10:17 pm
Location: Sydney, Australia

Post by keshav0307 »

you have duplicate values on the key so both the records will be updated twice with same value.
Post Reply