UNIQUE KEY constraint

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
jpraveen
Participant
Posts: 71
Joined: Sat Jun 06, 2009 7:10 am
Location: HYD

UNIQUE KEY constraint

Post by jpraveen »

hi all

my job will update the table my source and target is same table(SQL Server) and i also used the HASH keys

but i am getting the error message
Violation of UNIQUE KEY constraint 'IX_wk_PMGProvXref'. Cannot insert duplicate key in object 'wk_PMGProvXref'
The statement has been terminated.
and the job is aborted. if the same query i fired in MS-Access database it is working fine(it will only update the records with will not affect the uniquety constraint)

how to bypass the constraint and update the records by using datastage job
Jaypee
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

You really can't compare Access behaviour with other databases like that. You should pre-screen your data and only issue the update for rows you know won't violate that contraint.
-craig

"You can never have too many knives" -- Logan Nine Fingers
Post Reply