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
Updates,Indexes
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
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
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
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
"You can never have too many knives" -- Logan Nine Fingers