0

To all database genius out there,
I hope you can help me with this error I encountered when importing excel file to SQL Server 2005.

This is the error:

Executing (Error)
Messages
Error 0xc020901c: Data Flow Task 1: There was an error with output column "Description" (21) on output "Excel Source Output" (9). 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 "output column "Description" (21)" failed because truncation occurred, and the truncation row disposition on "output column "Description" (21)" 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 component "Source - 'Data $'" (1) 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.
 (SQL Server Import and Export Wizard)

Luckily I have a hint what the problem is all about : It is because data type in excel can only accommodate nvarchar 255, and when I import it, it is beyond nvarchar 255, and that it contains special characters like : ',; and chinese characters.
The thing is, I ran out of solutions.
Thank you in advance for those who will help.
Appreciate it. .

8
Contributors
14
Replies
30
Views
6 Years
Discussion Span
Last Post by Sai_421
0

How are you importing ?

I tight click the database -> tasks -> Import Data

0

you need to check if data in source is compatible with destination tables structure.

I already did, checked source to destination data types but the problem is, I am importing an excel file with description that contains characters greater than 255 (because excel can only accommodate 255 nvarchar right?) so now I am wondering what next step to take.
I already tried edit mappings and set nvarchar(255) to max but the error still occured.
Thank you foryour help.

0

I don't understand this.

<<because excel can only accommodate 255 nvarchar right?>>

Increasing the data type size in database side should solve your problem.

0

Increase the size of your description column, so the data will fit.

I already did that sir, set nvarchar 255 to nvarchar(max), error still occured.

0

I don't understand this.

<<because excel can only accommodate 255 nvarchar right?>>

Increasing the data type size in database side should solve your problem.

Hi debasisdas,
I mean, since I imported the file, the initial datatype was nvarchar 255, so what I did, I increased it's size, like what you recommended, and set it to nvarchar(MAX) and the error still occured.

0

The Datasize of the column should be increased before you import from excel. Also ensure that there exist the same number of columns in sql server as with the source file and make sure sql server can accomodate the datatypes of the source file in each respective column.

Should work for you

0

Just try this. you increase the size of your database field. I encounter this before when i use the SSIS.

0

Keep it simple, copy data to Access first and then import SQL Server from Access.. It's done for me..

Keep Trying

0

have you checked the source if it contains any single quote in the data for the column description ?

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.