Solved

error importing csv to sql

Posted on 2010-08-17
2
411 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
[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 Comments
 
LVL 16

Accepted Solution

by:
vdr1620 earned 250 total points
ID: 33454937
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
ID: 33456321
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

Use Case: Protecting a Hybrid Cloud Infrastructure

Microsoft Azure is rapidly becoming the norm in dynamic IT environments. This document describes the challenges that organizations face when protecting data in a hybrid cloud IT environment and presents a use case to demonstrate how Acronis Backup protects all data.

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 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…
Via a live example, show how to extract insert data into a SQL Server database table using the Import/Export option and Bulk Insert.

718 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