Solved

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

Posted on 2014-10-02
5
752 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 50

Assisted Solution

by:Vitor Montalvão
Vitor Montalvão earned 500 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 50

Assisted Solution

by:Vitor Montalvão
Vitor Montalvão earned 500 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 50

Accepted Solution

by:
Vitor Montalvão earned 500 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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Load balancing is the method of dividing the total amount of work performed by one computer between two or more computers. Its aim is to get more work done in the same amount of time, ensuring that all the users get served faster.
For both online and offline retail, the cross-channel business is the most recent pattern in the B2C trade space.
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…
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.

734 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