最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

Can SSIS convert CSV file to non-unicode before loading into SQL server? - Stack Overflow

programmeradmin1浏览0评论

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.

发布评论

评论列表(0)

  1. 暂无评论