admin管理员组

文章数量:1345127

I have a csv file in UTF-8 encoding. I want to use SSIS to load its data into a SQL server table. The table's column types are nvarchar(250). The SSIS shows error for all columns: cannot convert between unicode and non-unicode string data types.

The csv file's string columns become string [DT_STR] type in SSIS when I build a Flat File connection. If I convert columns to Unicode string [DT_WSTR] type, the SSIS can load csv data into SQL server table.

I know SSIS have a Data Conversion module to allow us convert each column's type. But that needs manual work to define each column's conversion. Is there any quick solution to convert all the columns in csv to Unicode string [DT_WSTR] type? The csv file cannot be changed.

本文标签: Can SSIS convert CSV file to nonunicode before loading into SQL serverStack Overflow