SQL server 导出平面文件时出错: The code page on Destination - 3_txt.Inputs[Flat File Destination Input].Columns[UserId] is 936 and is required to be 1252.

时间:2023-03-10 01:05:00
SQL server 导出平面文件时出错: The code page on Destination - 3_txt.Inputs[Flat File Destination Input].Columns[UserId] is 936 and is required to be 1252.

我在导出平面文件时:
Error 0xc00470d4: Data Flow Task 1: The code page on Destination - 3_txt.Inputs[Flat File Destination Input].Columns[UserId] is 936 and is required to be 1252.
(SQL Server Import and Export Wizard)
有时可以验证通过,有时不可以,这是啥原因?

我试过使用Unicode编码方式(有时可以),用1251(ANSI-Latin l)不行
SQL server 导出平面文件时出错: The code page on Destination - 3_txt.Inputs[Flat File Destination Input].Columns[UserId] is 936 and is required to be 1252.

解决办法:

SQL server 导出平面文件时出错: The code page on Destination - 3_txt.Inputs[Flat File Destination Input].Columns[UserId] is 936 and is required to be 1252.

在Code page 改为对应的936 编码就可以通过

SQL中查看编码的语句:

SELECT  COLLATIONPROPERTY('Chinese_PRC_Stroke_CI_AI_KS_WS', 'CodePage')