Oracle EE Update issue

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
kommven
Charter Member
Charter Member
Posts: 125
Joined: Mon Jul 12, 2004 12:37 pm

Oracle EE Update issue

Post by kommven »

While using update in Oracle EE (Upsert Mode)
(based on a Non-Key Value.)

Only updating the first occurance.

Any recommendations to avoid this situation?

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

Post by ray.wurlod »

What do you mean by "updating on a non-key value"? Are you using user-defined SQL?
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
kommven
Charter Member
Charter Member
Posts: 125
Joined: Mon Jul 12, 2004 12:37 pm

Post by kommven »

Its a generated statement.

I mean a repeating value. in a column.

Say If run update tableA set Col1 = 'a' wher col2 = 4 will update 100 rows in SQL.

In my Job

It runs only the first occurance.

Thats the situation.

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

Post by chulett »

What leads you to believe it 'runs only the first occurance'? Some specific examples would be good...
-craig

"You can never have too many knives" -- Logan Nine Fingers
kommven
Charter Member
Charter Member
Posts: 125
Joined: Mon Jul 12, 2004 12:37 pm

Post by kommven »

A SQL validation proved that.
Update Table1 Set CityName=Orchastrate.CityName Where CItyID=Orchastrate.CityID
is the genrated Query.

Initially, In Target CityName is NULL and CityID has a value.

AFTER JOB RUN

SQL iss returning results...
Chicago,9342
,9342
,9442
Dallas,9343
,9343
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

I'm forced to assume that "Orchastrate" misspelled is a result of your not using copy/paste. Get your Oracle DBA to intercept the command to see exactly what statement was executed.

If all else fails, join your data stream to the target table to make sure you get all the relevant rows updated; you may need to stage the results in a persistent Data Set prior to loading, to avoid locking issues.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Post Reply