Handling Primary Key conflict

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
nilotpalr
Participant
Posts: 29
Joined: Tue Dec 10, 2002 2:54 am

Handling Primary Key conflict

Post by nilotpalr »

I have 2 datastage jobs that insert in a single table. One job requires 4 columns as NOT NULL to get a unique record, while the other job needs only 2 columns of the same 4 column set to get an unique record. I cannot pass any default values in the 2nd job for the 2 columns for which I am not getting data. Can any one suggest a solution without altering the Database Not Null constraint settings.
Thanks,
Nilotpal.
vmcburney
Participant
Posts: 3593
Joined: Thu Jan 23, 2003 5:25 pm
Location: Australia, Melbourne
Contact:

Post by vmcburney »

You second job will have to write a value to all four NOT NULL fields. For empty numeric fields try writing a 0, for text fields try a blank space. If you leave these two fields out of job 2 it will try to add the NULL value which will trigger a database error.
Post Reply