[转]UTF-8 encoding support for the BCP utility and BULK INSERT Transact-SQL command in SQL Server 2014 SP2
2017-11-28 09:22
1706 查看
本文转自:https://support.microsoft.com/en-us/help/3136780/utf-8-encoding-support-for-the-bcp-utility-and-bulk-insert-transact-sq
Summary
This update improves SQL Server 2014 functionality by adding support for importing and exporting UTF-8 data to and from SQL Server, as follows:
UTF-8 import support is added to the BCP utility and to the BULK INSERT Transact-SQL command.
UTF-8 export support is added to the BCP utility.
BULK INSERT table_name FROM 'drive:path\file_name' WITH (CODEPAGE = '65001', DATAFILETYPE = 'Char')
To import UTF-8 data to SQL Server, use the BCP utility and run the following command:
bcp table_name in "drive:path\file_name" -c -C 65001
To export UTF-8 data to SQL Server, use the BCP utility and run the following command:
bcp table_name out "drive:path\file_name" -c -C 65001
This update is included in the following service pack for SQL Server:
SQL Server 2014 Service Pack 2
Summary
This update improves SQL Server 2014 functionality by adding support for importing and exporting UTF-8 data to and from SQL Server, as follows:
UTF-8 import support is added to the BCP utility and to the BULK INSERT Transact-SQL command.
UTF-8 export support is added to the BCP utility.
More Information
After you install this update, you can import UTF-8 data to SQL Server by running the following BULK INSERT Transact-SQL command:BULK INSERT table_name FROM 'drive:path\file_name' WITH (CODEPAGE = '65001', DATAFILETYPE = 'Char')
To import UTF-8 data to SQL Server, use the BCP utility and run the following command:
bcp table_name in "drive:path\file_name" -c -C 65001
To export UTF-8 data to SQL Server, use the BCP utility and run the following command:
bcp table_name out "drive:path\file_name" -c -C 65001
This update is included in the following service pack for SQL Server:
SQL Server 2014 Service Pack 2
相关文章推荐
- how to config the tftpd-hpa server in the ubuntu using for remote tftp client '-p' and '-r' command
- Using MERGE in SQL Server to insert, update and delete at the same time
- 海洋工作室——网站建设专家:The version of SQL Server in use does not support datatype datetime2 and the Entity Framework.
- Create country table and insert all the countries script for SQL Server
- Failed to generate a user instance of SQL Server due to a failure in starting the process for the user instance. The connection
- Failed to generate a user instance of SQL Server due to a failure in starting the process for the user instance. The connection
- Unable to update the EntitySet 'T_JsAPI' because it has a DefiningQuery and no <InsertFunction> element exists in the <ModificationFunctionMapping> element to support the current operation.
- 插入mysql语句报错:1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near
- Failed to generate a user instance of SQL Server due to a failure in starting the process for the user instance. The connection
- rlwrap for Command Line History and Editing in SQL*Plus and RMAN on Linux
- Failed to generate a user instance of SQL Server due to a failure in starting the process for the user instance
- Adding support for MrSid and other raster data formats in GeoServer
- java.sql.SQLException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for
- use ROW_NUMBER() for pagination in Oracle and SQLServer
- You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use
- An explicit value for the identity column in table can only be specified when a column list is used and IDENTITY_INSERT is ON
- The version of SQL Server in use does not support datatype 'datetime2'.
- Could not store transport type data for Receive Location 'Recv.Loc' to config store. Primary SSO Server 'Sql-server' failed. The external credentials in the SSO database are more recent.
- BCP command usage in SQL Server