writing Duplicate Records using ODBC

Post questions here relative to DataStage Server Edition for such areas as Server job design, DS Basic, Routines, Job Sequences, etc.

Moderators: chulett, rschirm, roy

Post Reply
pjsimon
Participant
Posts: 12
Joined: Mon Mar 28, 2005 4:18 pm

writing Duplicate Records using ODBC

Post by pjsimon »

Hello,
I'm trying to read 10 records from a sequential file and write to an oracle table using an ODBC stage since OCI does'nt work for the time being.......
Out of the 10 records only 3 of them are unique and when i write it to the table it writes only the unique records.........but i wanted it to write all the 10 records........... Does any one know what the problem is or am i missing something????


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

Post by chulett »

You may want to post something (as in another thread) on the subject of "OCI doesn't work for the time being" as using ODBC is... less than ideal.

How would you process 'duplicate' records outside of DataStage? It's no different here. Duplicates must, in some fashion, either update or replace the offending record with the same key.

What update action are you using in the stage? Have you considered using a hashed file inline in the job to track keys used so far and control the whole 'insert versus update' portion of the job?

You do realise that when you write "all 10 records" to the table that there won't be 10 records in it, yes? :?
-craig

"You can never have too many knives" -- Logan Nine Fingers
kumar_s
Charter Member
Charter Member
Posts: 5245
Joined: Thu Jun 16, 2005 11:00 pm

Post by kumar_s »

Hi Prince,
Welcom Aboard!!!
Craigs main cocern is to let you investigate the reason behind the duplicates.
Obviously any primary key mention in a table wont accept duplicat keys.
If you are in the testing phase and want to desperately load the table with those duplicate data, try droping the primary key from the table.(Which will be totally illogic :wink: )

-kumar
Post Reply