Update not working

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
ag_ram
Premium Member
Premium Member
Posts: 524
Joined: Wed Feb 28, 2007 3:51 am

Update not working

Post by ag_ram »

Hi All,

I have a following job design
sequential file -- transformer - Oracle enterprise stage.

I need to update the table incase of matching key columns otherwise i need to insert a new row.
but even if there are matching rows, it still inserts a new row resulting in duplicates.
i have verified key columns are of same type,
I ran the job with only one key column which is a char field of one length and still update is not working. pls help me to solve the problem,
There are no key columns in my table.
i am using auto generated update and Insert option.
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

Are you using custom SQL , and if so, please post it. If you are getting duplicate "key" columns, then most likely your table DDL is not correct. You might look at that and/post it here as well.
Kryt0n
Participant
Posts: 584
Joined: Wed Jun 22, 2005 7:28 pm

Re: Update not working

Post by Kryt0n »

ag_ram wrote:Hi All,

I have a following job design
sequential file -- transformer - Oracle enterprise stage.

I need to update the table incase of matching key columns otherwise i need to insert a new row.
but even if there are matching rows, it still inserts a new row resulting in duplicates.
i have verified key columns are of same type,
I ran the job with only one key column which is a char field of one length and still update is not working. pls help me to solve the problem,
There are no key columns in my table.
i am using auto generated update and Insert option.
Are you doing "Insert then Update" or "Update then Insert"? (That's a setting in Oracle Stage btw, not a general query)
Last edited by Kryt0n on Thu Sep 17, 2009 2:59 pm, edited 1 time in total.
keshav0307
Premium Member
Premium Member
Posts: 783
Joined: Mon Jan 16, 2006 10:17 pm
Location: Sydney, Australia

Post by keshav0307 »

the table must have unique index on the key columns
Sreenivasulu
Premium Member
Premium Member
Posts: 892
Joined: Thu Oct 16, 2003 5:18 am

Post by Sreenivasulu »

If possible I would rather perform insert and update in separate jobs.

Datastage has not yet implemented transaction handling features like 'auto commit','begin and close transation' and other database critical features which are the need of the hour.

Regards
Sreeni
kduke
Charter Member
Charter Member
Posts: 5227
Joined: Thu May 29, 2003 9:47 am
Location: Dallas, TX
Contact:

Post by kduke »

You can insert by looking up the record in the target to figure out if it is an insert or an update. You could do this in 2 links or 2 different jobs.
Mamu Kim
Post Reply