Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

10777- Error: Data Flow Task at 0xC02020A1, Flat File Source [30]: Data conversion failed

Posted on 2014-10-02
5
Medium Priority
?
786 Views
Last Modified: 2014-10-06
I have a text file generated SAP, all columns of type string must move to the data type DT_WSTR, I can explain why?

If I do the following error:
Error: Data Flow Task at 0xC02020A1, Flat File Source [30]: Data conversion failed. The data conversion for column "country" returned status value 4 and status text "Text was truncated or one or more characters HAD no match in the target code page.".
Error: Data Flow Task at 0xC020902A, Flat File Source [30]: The "Flat File Source.Outputs [Flat File Source Output] .Columns [country]" failed Because truncation occurred, and the truncation row disposition on "Flat File Source. Outputs [Flat File Source Output] .Columns [country] "specifies failure on truncation. A truncation errors occurred on the specified object of the specified component.
0
Comment
Question by:enrique_aeo
[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 52

Assisted Solution

by:Vitor Montalvão
Vitor Montalvão earned 2000 total points
ID: 40359210
DT_WSTR? Are you working with a SSIS package?
I couldn't realize if you are importing data from text file to a database but if so then the COUNTRY column must be NVARCHAR type and need to have enough length to receive the data from the text file.
0
 

Author Comment

by:enrique_aeo
ID: 40359421
i am using SSIS,
that the data type must be NVARCHAR?
cliente-direccion-err.csv
0
 
LVL 52

Assisted Solution

by:Vitor Montalvão
Vitor Montalvão earned 2000 total points
ID: 40359426
Yes, it should.
This should be the relation from SSIS data type to MSSQL data type:
DT_WSTR --> NVARCHAR
DT_STR -----> VARCHAR
0
 

Author Comment

by:enrique_aeo
ID: 40359439
it is a rule ?:
when we have a kind of text data in a flat file; then in the database I create a data type NVARCHAR
0
 
LVL 52

Accepted Solution

by:
Vitor Montalvão earned 2000 total points
ID: 40359449
No rule. It depends on which datatypes are you using. I'm just giving you the equivalence between SSIS and MSSQL.
You can even use numeric datatype if you are sure that the text file have only numbers for that column. The same for date and time datatypes.
0

Featured Post

Learn how to optimize MySQL for your business need

With the increasing importance of apps & networks in both business & personal interconnections, perfor. has become one of the key metrics of successful communication. This ebook is a hands-on business-case-driven guide to understanding MySQL query parameter tuning & database perf

Question has a verified solution.

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

For both online and offline retail, the cross-channel business is the most recent pattern in the B2C trade space.
In the first part of this tutorial we will cover the prerequisites for installing SQL Server vNext on Linux.
Via a live example, show how to shrink a transaction log file down to a reasonable size.
Viewers will learn how the fundamental information of how to create a table.

704 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