Updates,Indexes

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
RPhani
Participant
Posts: 32
Joined: Sun Aug 26, 2012 7:03 am
Location: Hyd

Updates,Indexes

Post by RPhani »

Hi Experts,

Table has 2 Unique indexes.
Index-1 created on Col1,Col2,Col3
Index-2 created on Col4,Col5,Col6

I took Col1 and Col4 are key columns in Oracle stage for updates.
I am not getting correct results.

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

Post by ray.wurlod »

More information required.
What are you attempting to accomplish?
What results do you expect?
What actual results are you getting?
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
RPhani
Participant
Posts: 32
Joined: Sun Aug 26, 2012 7:03 am
Location: Hyd

Post by RPhani »

Thanks Ray.

Table has no Primary keys.Col1 and Col4 are not null columns.
I am doing upserts based on Col1,Col4.

Example:
Table contains Col1 values 1,2,3,4...
and Col4 is Hardcoded with 'A'

Requirement is: i need to add new records which have
Col1 values 1,2,3,4...
Col4 is Hardcoded with 'B'

all new records are rejected in Job with error code:0 description is:Row not Updated-Insert then update mode

desired o/p is:
Col1 Col4
1 A
2 A
3 A
4 A
1 B
2 B
3 B
4 B



Thanks in advance,
Phani
RPhani
Participant
Posts: 32
Joined: Sun Aug 26, 2012 7:03 am
Location: Hyd

Post by RPhani »

Hi,

The combination of Col1,Col4 is not working for updates.
Any suggestions to sort out this issue?

Thanks,
Phani
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Clarify something. If you are in 'Insert then Update' mode then the insert must fail for the update to be attempted. And it will only fail if it violates a unique constraint. However, which part of this is your issue - the fact that new records are not getting inserted or that you are having an update issue? Why are you even attempting updates if your only goal is to insert new records?
-craig

"You can never have too many knives" -- Logan Nine Fingers
Post Reply