?
Solved

trying to import delimited file

Posted on 2015-01-23
5
Medium Priority
?
125 Views
Last Modified: 2016-02-15
Hello! I have a tab delimited file that I am trying to import into SQL, but I cannot because of these errors below. Can anyone tell me how I can get this into SQL?

- Executing (Error)
Messages
Error 0xc02020a1: Data Flow Task: Data conversion failed. The data conversion for column "CompanyName" 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 0xc020902a: Data Flow Task: The "output column "CompanyName" (46)" failed because truncation occurred, and the truncation row disposition on "output column "CompanyName" (46)" specifies failure on truncation. A truncation error occurred on the specified object of the specified component.
 (SQL Server Import and Export Wizard)
 
Error 0xc0202092: Data Flow Task: An error occurred while processing file "C:\Users\xxx\Desktop\file.txt" on data row 47.
 (SQL Server Import and Export Wizard)
 
Error 0xc0047038: Data Flow Task: SSIS Error Code DTS_E_PRIMEOUTPUTFAILED.  The PrimeOutput method on component "Source - file" (1) returned error code 0xC0202092.  The component returned a failure code when the pipeline engine called PrimeOutput(). The meaning of the failure code is defined by the component, but the error is fatal and the pipeline stopped executing.  There may be error messages posted before this with more information about the failure.
 (SQL Server Import and Export Wizard)
 
Error 0xc0047021: Data Flow Task: SSIS Error Code DTS_E_THREADFAILED.  Thread "SourceThread0" has exited with error code 0xC0047038.  There may be error messages posted before this with more information on why the thread has exited.
 (SQL Server Import and Export Wizard)
 
Error 0xc0047039: Data Flow Task: SSIS Error Code DTS_E_THREADCANCELLED.  Thread "WorkThread0" received a shutdown signal and is terminating. The user requested a shutdown, or an error in another thread is causing the pipeline to shutdown.  There may be error messages posted before this with more information on why the thread was cancelled.
 (SQL Server Import and Export Wizard)
 
Error 0xc0047021: Data Flow Task: SSIS Error Code DTS_E_THREADFAILED.  Thread "WorkThread0" has exited with error code 0xC0047039.  There may be error messages posted before this with more information on why the thread has exited.
 (SQL Server Import and Export Wizard)
0
Comment
Question by:mrosier
[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
  • 2
  • 2
5 Comments
 
LVL 51

Expert Comment

by:Vitor Montalvão
ID: 40566646
The data conversion for column "CompanyName" returned status value 4 and status text "Text was truncated or one or more characters had no match in the target code page.".

Where the file is coming from?
What is the size of the CompanyName?
Can a record that you are trying to import be larger than that size?
This process always worked?
0
 

Author Comment

by:mrosier
ID: 40566658
it is coming in from just a tab delim. file. I am not sure as to the content of the data, but is there a field type/length I could use that should just allow anything in? We have always imported these  tab-del files before, but not this particular instance.
0
 
LVL 51

Accepted Solution

by:
Vitor Montalvão earned 2000 total points
ID: 40566662
You should verify and compare the lengths from file and table fields. If SQL Server is truncating the value is because is reading something bigger than what he can fits in that specific column.
0
 
LVL 18

Expert Comment

by:Simon
ID: 40566679
I think it's either truncating or using a wrong code page.Check code page on the import wizardTry Vitor's suggestions, but also worth checking that when you import it either shows ANSI - Latin I or UTF-8.

Sometimes formatting codes or other characters (eg. in barcode encodings) can fool the Wizard into thinking it should use some exotic code page.

You can open the file in Excel first to have a quick look at field lengths. If you're creating a new table when you import it shouldn't give you truncate errors unless you have very long strings.
0
 

Author Comment

by:mrosier
ID: 40566740
Ok so the answer turned out to be just making all the fields 255. Thanks!
0

Featured Post

Independent Software Vendors: 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

Everyone has problem when going to load data into Data warehouse (EDW). They all need to confirm that data quality is good but they don't no how to proceed. Microsoft has provided new task within SSIS 2008 called "Data Profiler Task". It solve th…
My client sends a request to me that they want me to load data, which will be returned by Web Service APIs, and do some transformation before importing to database. In this article, I will provide an approach to load data with Web Service Task and X…
In this video, Percona Solution Engineer Dimitri Vanoverbeke discusses why you want to use at least three nodes in a database cluster. To discuss how Percona Consulting can help with your design and architecture needs for your database and infras…
In this video, Percona Director of Solution Engineering Jon Tobin discusses the function and features of Percona Server for MongoDB. How Percona can help Percona can help you determine if Percona Server for MongoDB is the right solution for …

765 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