Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

SQL Server 2014 export error

Posted on 2016-08-22
5
Medium Priority
?
105 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 66

Accepted Solution

by:
Jim Horn earned 2000 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 66

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 66

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

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

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

A couple of weeks ago, my client requested me to implement a SSIS package that allows them to download their files from a FTP server and archives them. Microsoft SSIS is the powerful tool which allows us to proceed multiple files at same time even w…
An alternative to the "For XML" way of pivoting and concatenating result sets into strings, and an easy introduction to "common table expressions" (CTEs). Being someone who is always looking for alternatives to "work your data", I came across this …
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…
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.

609 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