Unique key warning generated
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 94
- Joined: Sun Jul 18, 2010 11:35 pm
Unique key warning generated
I am new at Datastage ..
I am getting these 30 - 40 warnings about violating a Unique Index on a column..
the warning is [Microsoft][ODBC SQL Server Driver][SQL Server]Cannot insert duplicate key row in object 'dbo.D_Employee' with unique index 'D_Employee_NK'.
How can I handle this ?
I am getting these 30 - 40 warnings about violating a Unique Index on a column..
the warning is [Microsoft][ODBC SQL Server Driver][SQL Server]Cannot insert duplicate key row in object 'dbo.D_Employee' with unique index 'D_Employee_NK'.
How can I handle this ?
-
- Participant
- Posts: 94
- Joined: Sun Jul 18, 2010 11:35 pm
The info I gave was incomplete
Before adding 4 columns in the job it ran fine
after adding the columns it is giving warning on a column which I did not modify
[Microsoft][ODBC SQL Server Driver][SQL Server]Cannot insert duplicate key row in object 'dbo.D_Employee' with unique index 'D_Employee_NK'.
why did it ran fine earlier
Before adding 4 columns in the job it ran fine
after adding the columns it is giving warning on a column which I did not modify
[Microsoft][ODBC SQL Server Driver][SQL Server]Cannot insert duplicate key row in object 'dbo.D_Employee' with unique index 'D_Employee_NK'.
why did it ran fine earlier
I suspect that if you remove those 4 offending columns the warnings will persist. Can you check and post what your unique index "D_Employee_NK" consists of?
<a href=http://www.worldcommunitygrid.org/team/ ... TZ9H4CGVP1 target="WCGWin">
</a>
</a>
Much like Arnd, I suspect that the definition of the unique index changed when the four columns were added. Or it could be a data issue, one where you never had duplicate values before and do now. But I would verify the fields that make up the index first so you know what to look for.
-craig
"You can never have too many knives" -- Logan Nine Fingers
"You can never have too many knives" -- Logan Nine Fingers
-
- Participant
- Posts: 597
- Joined: Fri Apr 29, 2005 6:19 am
- Location: Singapore
Or may be when you ran first, the table was empty. When you ran again after adding 4 columns, the table was not truncated and you are trying to load the same data with additional information. I asssume that you altered the table rather than dropping and recreating the table
Kandy
_________________
Try and Try again…You will succeed atlast!!
_________________
Try and Try again…You will succeed atlast!!