Solved

error importing csv to sql

Posted on 2010-08-17
2
404 Views
Last Modified: 2012-08-14
Hi.

I am trying to import a csv into SQL 2008 and i get the following error:

Executing (Error)
Messages
Error 0xc02020a1: Data Flow Task 1: Data conversion failed. The data conversion for column "Mailing Street" 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 1: The "output column "Mailing Street" (98)" failed because truncation occurred, and the truncation row disposition on "output column "Mailing Street" (98)" 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 1: An error occurred while processing file "C:\Users\tanvi\Documents\Fusion\database\salesforce\report1282048903904_test.csv" on data row 3.
 (SQL Server Import and Export Wizard)
 
Error 0xc0047038: Data Flow Task 1: SSIS Error Code DTS_E_PRIMEOUTPUTFAILED.  The PrimeOutput method on component "Source - report1282048903904_test_csv" (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)

please help as i have no idea what this means.
0
Comment
Question by:oldtedt
2 Comments
 
LVL 16

Accepted Solution

by:
vdr1620 earned 250 total points
Comment Utility
Looking at the error, All i can say is a truncation occurred on the Mailing Street Column, that is The length of the values in that particular column are more than the length of your Destination ie.,SQL Server Table Column

I would suggest you to check the Length of the column in both source and destination, If possible increase the length of your destination column

Check the Value of the Mailing Street Column in 3rd row of the file report1282048903904_test.csv
0
 

Author Comment

by:oldtedt
Comment Utility
Thanks for that. it was a trucation problem, difference in the size of source and destinatation. this error occured for various other fields as well since sql import takes a default size of 50. I just changed all sizes to 1000. Also the surprising bit was i got the same error for a date value in source file. i had to increase that to 1000 as well!
0

Featured Post

6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
asp.net bundle 8 33
MS SQL Backup 24 69
ASP.NET Web Form Variables being reset 2 17
Database connection opened on a machine 8 28
When you hear the word proxy, you may become apprehensive. This article will help you to understand Proxy and when it is useful. Let's talk Proxy for SQL Server. (Not in terms of Internet access.) Typically, you'll run into this type of problem w…
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…
Via a live example, show how to set up a backup for SQL Server using a Maintenance Plan and how to schedule the job into SQL Server Agent.
Via a live example, show how to setup several different housekeeping processes for a SQL Server.

772 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

16 Experts available now in Live!

Get 1:1 Help Now