SQL Server The column cannot be processed because more than 1 code page (65001 and 1252) are specified for it

sg2wtvxw  于 2023-03-07  发布在  SQL Server
关注(0)|答案(4)|浏览(224)

I did a select * on a table. I exported the results and tried to import it and write to another table (I have to do this via SSIS, I cannot do this via SQL Server (i.e. select into ) for security permission purposes, but I can do it this way).

How can I fix this error? What exactly does it mean? I tried searching StackOverflow but my search was not very helpful.

I tried to use an OLEDB source step, but my server instance does not appear for some reason, so now I'm trying to export/import out of SSMS.

jhdbpxl9

jhdbpxl91#

I usually get this error while im having a destination and a source with different codepages. it seems that you have a flat file with a 1252 codepage and a destination table with 65001 codepage (or vice versa). You should try Data Conversion component between your source component and destination.

pdtvr36n

pdtvr36n2#

I had same issue. I resolved it setting AlwaysUseDefaultCodePage settings as True and setting the DefaultCodePage as 65001 (same as source file).

Note: Opening the csv file in Notepadd++ and making necessary codepage changes is another option

Screenshots below.

pjngdqdw

pjngdqdw3#

You are trying to map a column from a value with Code Page65001 (UTF-8) to a value with 1252 (ANSI - Latin I) or vice versa. To fix that, I recommend you to include a task of type Derived Column and add a new column with the appropriate Code Page . Now you must obtain an output with the appropriate encoding to retrieve the data.

xsuvu9jc

xsuvu9jc4#

Go to your bottom right and on properties section under custom properties change AlwaysUseDeafultCodePage to True.

相关问题