Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Cannot Insert Null - ALMOST THERE!! - Please help... 1

Status
Not open for further replies.

eb24

Programmer
Dec 17, 2003
240
US
I have a DTS package that executes once a week and that basically exports some data from Table1 to Table2. I noticed that the job failed and when I went to the Package Designer and Executed it from there, it seemed to be running, but then Failed after (7808) rows.

The message I received was that it COULD NOT insert NULL into some primary key field, say Table2ID. I then went to Query Analyzer and did a quick SELECT statement to see what rows were going to transfer over and exactly 7808 came out as the solution.

Thus, this brings to me to think that AFTER the last row is IMPORTED into Table2, it seems that this table is expecting another row to be inserted but it is not.

Can anyone see what is occurring here? How can I go about to alleviate this? Your assistance will be greatly appreciated!
 
I ran into a similar issue this morning and may have a remedy. Does the table that you are importing into have an Identity Seed set as the primary key? IF SO ... you need to set the "Enable Identity Insert" OFF/Unchecked.

You can see this setting if you create another import job thru the Import wizard. When the "Select Source Tables and Views" screen is shown, click on the "transformation" section and in there you will find the "Enable Identity Insert" check box. This is where you diable it.

Give that a roll and hope it helps!

Thanks

J. Kusch
 
JayKusch:

Thanks! That did it...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top