Page 1 of 1

UNIQUE KEY constraint

Posted: Thu Oct 21, 2010 8:31 am
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

Posted: Thu Oct 21, 2010 10:12 am
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.