Page 1 of 1

Updates,Indexes

Posted: Wed Jul 10, 2013 3:55 am
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

Posted: Wed Jul 10, 2013 3:56 am
by ray.wurlod
More information required.
What are you attempting to accomplish?
What results do you expect?
What actual results are you getting?

Posted: Wed Jul 10, 2013 4:12 am
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

Posted: Thu Jul 11, 2013 4:01 am
by RPhani
Hi,

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

Thanks,
Phani

Posted: Thu Jul 11, 2013 7:16 am
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?