Solved

SQL Server 2014 export error

Posted on 2016-08-22
5
48 Views
Last Modified: 2016-08-22
Hi There,

I'm trying to export a table in my database to a flat file. One of the columns is type nvarchar (200) and that's the column that the export job is having trouble with.

thanks in advance for your help!

Here's the error message:

- Copying to C:\BEST_FILES\tbDisc.txt (Error)
Messages
Error 0xc02020a1: Data Flow Task 1: Data conversion failed. The data conversion for column "nvc_Album" returned status value 4 and status text "Text was truncated or one or more characters had no match in the target code page.".
 (SQL Server Import and Export Wizard)
 
Error 0xc02020a0: Data Flow Task 1: Cannot copy or convert flat file data for column "nvc_Album".
 (SQL Server Import and Export Wizard)
 
Error 0xc0047022: Data Flow Task 1: SSIS Error Code DTS_E_PROCESSINPUTFAILED.  The ProcessInput method on component "Destination - tbDisc_txt" (43) failed with error code 0xC02020A0 while processing input "Flat File Destination Input" (44). 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)
0
Comment
Question by:forcedexposure
  • 3
  • 2
5 Comments
 
LVL 65

Accepted Solution

by:
Jim Horn earned 500 total points
ID: 41766021
<knee-jerk reaction>

In the SSIS designer locate the flat file connection and double-click on it  The Connection Manager will display.
Choose Advanced on the left side
Locate column nvc_Album and click on it
The DataType property should be Unicode string [DT_WSTR], and the OutputColumnWidth should be 200.
1
 
LVL 65

Expert Comment

by:Jim Horn
ID: 41766030
>Text was truncated or one or more characters had no match in the target code page.".
Another issue may be the column values that are mapped to this column are more than 200 characters, which means you'll have to either increase the OutputColumnWidth number to accommodate the largest value, or cut off the values at 200 characters using something like LEFT(nvc_Album, 200).
0
 

Author Comment

by:forcedexposure
ID: 41766042
Thanks Jim! Actually, I'm using the SQL Server Import and Export Wizard for a one-time export.
I clicked on the "edit mappings..." button and see that the type is set to DT_WSTR and the column size is set to 200. So, following your suggestion here, i went back to the connection window and selected "UNICODE" for the output. that seems to have worked! thank you!!!
0
 

Author Closing Comment

by:forcedexposure
ID: 41766043
thanks for your help!
0
 
LVL 65

Expert Comment

by:Jim Horn
ID: 41766046
Thanks for the accept, good luck with your project.  -Jim

By an amazing coincidence I'm currently working an SSIS package that takes travel agent data from all over Europe and validating/loading into a data warehouse, so I'm dealing with unicode issues in SSIS right now.
1

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Suggested Solutions

My client has a dictionary table. They're defining a list of standard naming convention. Now, they are requiring my team to provide us a mechanism how to match new incoming data with existing data in their system.
Ever wondered why sometimes your SQL Server is slow or unresponsive with connections spiking up but by the time you go in, all is well? The following article will show you how to install and configure a SQL job that will send you email alerts includ…
Familiarize people with the process of utilizing SQL Server functions from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Ac…
Viewers will learn how to use the SELECT statement in SQL to return specific rows and columns, with various degrees of sorting and limits in place.

747 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now