Solved

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

Posted on 2014-10-02
5
718 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
  • 3
  • 2
5 Comments
 
LVL 45

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 45

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 45

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

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

Slowly Changing Dimension Transformation component in data task flow is very useful for us to manage and control how data changes in SSIS.
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, show how to backup a database, simulate a failure backup the tail of the database transaction log and perform the restore.

708 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now