0
votes

I use SQL Server Import and Export Wizard for import data from an excel sheet. And these are the errors:

Messages Error 0xc020901c: Data Flow Task 1: There was an error with Source - Sheet1$.Outputs[Excel Source Output].Columns[PtnDescription] on Source - Sheet1$.Outputs[Excel Source Output]. The column status returned was: "Text was truncated or one or more characters had no match in the target code page.". (SQL Server Import and Export Wizard)

Error 0xc020902a: Data Flow Task 1: The "Source - Sheet1$.Outputs[Excel Source Output].Columns[PtnDescription]" failed because truncation occurred, and the truncation row disposition on "Source - Sheet1$.Outputs[Excel Source Output].Columns[PtnDescription]" specifies failure on truncation. A truncation error occurred on the specified object of the specified component. (SQL Server Import and Export Wizard)

Error 0xc0047038: Data Flow Task 1: SSIS Error Code DTS_E_PRIMEOUTPUTFAILED. The PrimeOutput method on Source - Sheet1$ returned error code 0xC020902A. The component returned a failure code when the pipeline engine called PrimeOutput(). The meaning of the failure code is defined by the component, but the error is fatal and the pipeline stopped executing. There may be error messages posted before this with more information about the failure.

And the columns thta I have enter image description here

What can I do?

1
The "Source - Sheet1$.Outputs[Excel Source Output].Columns[PtnDescription]" failed because truncation occurred that means that the PtnDescription table field is too short. Increase it so it can accept the largest description string in your file - Panagiotis Kanavos

1 Answers

0
votes

That means there are unicode characters in your Excel source data that cannot be converted to the the target column(s) in SQL Server [varchar() or char()]. In SQL Server you need to use nvarchar() or char() columns to store unicode data you want to import from Excel.

The import wizard is throwing an error and letting you know (albeit mystically) that is the problem.

UPDATE: Disregard this, Panagotis is correct, you have need to widen your target, not change the data type. Sorry for the confusion.