Solved

SQL Server 2014 export error

Posted on 2016-08-22
5
81 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Online Training Solution

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action. Forget about retraining and skyrocket knowledge retention rates.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Display Date and Time 7 48
What type of testing am I doing? 4 75
Using rowversion for incremental load of datawarehouse. 12 35
Creating Scalar Function 3 17
This article explains how to reset the password of the sa account on a Microsoft SQL Server.  The steps in this article work in SQL 2005, 2008, 2008 R2, 2012, 2014 and 2016.
In this article we will learn how to fix  “Cannot install SQL Server 2014 Service Pack 2: Unable to install windows installer msi file” error ?
Familiarize people with the process of retrieving data from SQL Server using an Access pass-thru query. Microsoft Access is a very powerful client/server development tool. One of the ways that you can retrieve data from a SQL Server is by using a pa…
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.

732 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