Solved

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

Posted on 2014-10-02
5
764 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 51

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 51

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 51

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

Industry Leaders: 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

Why is this different from all of the other step by step guides?  Because I make a living as a DBA and not as a writer and I lived through this experience. Defining the name: When I talk to people they say different names on this subject stuff l…
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.
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…
Via a live example combined with referencing Books Online, show some of the information that can be extracted from the Catalog Views in SQL Server.

630 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