value violated the integrity constraints
There was an error
with input
column "Bk_key"
(121084)
on input "OLE DB Destination Input"
(120862).
The column
status returned was:
"The value violated the integrity constraints for the column.".
November 17th, 2010 3:28am
Check out the constraints defined on the column. The value you are trying to insert is against that constraint.
For example your column might be defined as NOT NULL and value your are about to insert is NULL.Rahul Kumar, MCTS, India, http://sqlserversolutions.blogspot.com/
Free Windows Admin Tool Kit Click here and download it now
November 17th, 2010 4:02am
Actually there is not pk or fk . source is also int not null and destination also int not null. i defined as four byte integer as well .
Do you think of any other problems let me know
thanks for help.
November 17th, 2010 4:06am
Can you paste destination table definition.. ( create table stmt).
As you told destination as NOT NULL on BK_KEY, please be sure that you dont try to insert NULL into the column.Rahul Kumar, MCTS, India, http://sqlserversolutions.blogspot.com/
Free Windows Admin Tool Kit Click here and download it now
November 17th, 2010 4:12am
ISNULL(Bk_key) && [Copy of BK] == 0 ? 0 : ISNULL(Bk_key) && [Copy of BK] > 0 ? -1 : Bk_key
and source is pk not null . Are think of any other situations .
November 17th, 2010 4:19am
Thats good..if this is going to BK_KEY then NOT NULL shouldnt be a problem.
Can you are privide Destination TABLE Defination... (CREATE TABLE DestinationTable ( ...))
Rahul Kumar, MCTS, India, http://sqlserversolutions.blogspot.com/
Free Windows Admin Tool Kit Click here and download it now
November 17th, 2010 4:28am
it is a vey big table and , the destination is not null.
November 17th, 2010 4:41am
one more thing to add:
i can see this advanced editior page with input
column "Bk_key"
(121084)
on
this i am not able to see in advanced editor :input "OLE DB Destination Input"
(120862).
do you what i am saying .
Free Windows Admin Tool Kit Click here and download it now
November 17th, 2010 4:54am
Hi kiranshiva,
What is the column the following expression used for:
ISNULL(Bk_key) && [Copy of BK] == 0 ? 0 : ISNULL(Bk_key) && [Copy of BK] > 0 ? -1 : Bk_key
From the error message, I noticed you were using Bk_key in the destination. I assume you added a deliver column to the package. In the deliver column, you tried to delivered the Bk_key column. Here, I would like to if you were using "Replace with Bk_key"
or "Add a new column".
If it is "Add a new column", please use the new column in the destination instead of Bk_key.
Anyway, the expression should contain Null too. If the ISNULL(Bk_key) && [Copy of BK] < 0 , the return value will be Bk_key, and it is null.
Thanks,
Jin ChenJin Chen - MSFT
November 22nd, 2010 1:23am