Wrong characters in csv file cause troubles when import to MS SQL Server

0

I'm trying to import vertical bars delimited csv file to MS SQL Serever 2008 R2. I'm using Import Wizard for this purpose. I know the reason of the troubles - some specific characters that contain in file, like this:

98937|Novotel Aix en Provence Pont de lВґArc FenouillГЁre|3EST|AIX|1|ACCOR||43.51172|5.45396

I believe this is reason because when I delete such row, it;s passing successfully to the next rows. The error I got is:

- Executing (Error)
Messages
Error 0xc02020a1: Data Flow Task 1: Data conversion failed. The data conversion for column "Column 1" 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 "Column 1" (14)" failed because truncation occurred, and the truncation row disposition on "output column "Column 1" (14)" 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\Administrator\Downloads\Extended[1]\Extended\Hotels.csv" on data row 1999.
 (SQL Server Import and Export Wizard)

Error 0xc0047038: Data Flow Task 1: SSIS Error Code DTS_E_PRIMEOUTPUTFAILED.  The PrimeOutput method on component "Source - Hotels_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)

How I can change file of ignore error or may be there is some other way?

sql-server-2008
csv
import
asked on Stack Overflow Nov 19, 2013 by andrey.shedko

1 Answer

0

ANSII is the answer. I did saved csv in ANSII format an then it run fine.

answered on Stack Overflow Nov 27, 2013 by andrey.shedko

User contributions licensed under CC BY-SA 3.0