4
votes

I am trying to import data from an Excel file to an SQL database with the SQL Import Export wizard. We've had 4 sheets upload correctly and we are able to query them. For some reason though, a few of our tables are giving some errors and we aren't sure how to decipher them or what the problem could be, as they are very similar to the tables that have worked.

Here are the errors:

  • Copying to [dbo].[Products] (Error) Messages Error 0xc0202009: Data Flow Task 1: SSIS Error Code DTS_E_OLEDBERROR. An OLE DB error has occurred. Error code: 0x80004005. An OLE DB record is available. Source: "Microsoft SQL Server Native Client 11.0" Hresult: 0x80004005 Description: "Unspecified error". (SQL Server Import and Export Wizard)

Error 0xc020901c: Data Flow Task 1: There was an error with Destination - Products.Inputs[Destination Input].Columns[ProductID] on Destination - Products.Inputs[Destination Input]. The column status returned was: "The value violated the integrity constraints for the column.". (SQL Server Import and Export Wizard)

Error 0xc0209029: Data Flow Task 1: SSIS Error Code DTS_E_INDUCEDTRANSFORMFAILUREONERROR. The "Destination - Products.Inputs[Destination Input]" failed because error code 0xC020907D occurred, and the error row disposition on "Destination - Products.Inputs[Destination Input]" specifies failure on error. An error occurred on the specified object of the specified component. There may be error messages posted before this with more information about the failure. (SQL Server Import and Export Wizard)

Error 0xc0047022: Data Flow Task 1: SSIS Error Code DTS_E_PROCESSINPUTFAILED. The ProcessInput method on component "Destination - Products" (38) failed with error code 0xC0209029 while processing input "Destination Input" (51). The identified component returned an error from the ProcessInput method. The error is specific to the component, but the error is fatal and will cause the Data Flow task to stop running. There may be error messages posted before this with more information about the failure. (SQL Server Import and Export Wizard)

What do these mean? And what could we need to do to fix them?

Thanks

2
Do you have Products.ProductID set-up as a primary key and are trying to insert dupicate values?Sean Cox
No duplicate values. We just found out the wizard was finding a bunch of null rows in the sheet (that shouldn't have been there) for some reason so we just recreated the sheet and it worked :/Carlton
Yeah, null values don't work out too well for primary keys. :DSean Cox

2 Answers

2
votes

we had similar issue. Since you have a column which can not be null, you need to remove empty rows. Just select all rows after last record and remove it then save your excel sheet and try to upload again.

0
votes

The error message "The value violated the integrity constraints for the column" indicates that it's trying to import data and it is violating a constraint on your ProductID column. It's likely that either there are null values for the column that are trying to go into a field that is not null-able, or adding the row would violate some foreign key constraints.