SQL Server and Excel spreadsheet data import issue using SSIS

0

I am using SSDT for Visual Studio 2013 and SQL Server 2014. I am working on importing data from Excel spreadsheets to SQL Server tables, using Excel source and OLE DB destination. I get this String or binary data would be truncated. error on OLE DB destination. I checked everything and I don't have VARCHAR fields over 255 and using IMEX = 1 in the Excel connection string. I tried to import one field at a time for test and still get the same error and not sure column that is.

SSIS Error:

[OLE DB Destination [28]] Error: 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: "The statement has been terminated.". An OLE DB record is available. Source: "Microsoft SQL Server Native Client 11.0" Hresult: 0x80004005 Description: "String or binary data would be truncated.".

[SSIS.Pipeline] Error: SSIS Error Code DTS_E_PROCESSINPUTFAILED. The ProcessInput method on component "OLE DB Destination" (28) failed with error code 0xC0202009 while processing input "OLE DB Destination Input" (59). 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
excel
ssis
asked on Stack Overflow Dec 29, 2016 by user25407 • edited Dec 29, 2016 by 3N1GM4

1 Answer

0

If you import one field at a time, the field that errors out should be the column with the problem. What I have experienced is the excel file has quotes ("") or a special character in a field and is combining two fields as one when loaded into the SQL table. So I save the excel file as CSV and import the CSV.

answered on Stack Overflow Dec 29, 2016 by openball

User contributions licensed under CC BY-SA 3.0