插入具有不同排序规则的数据时如何转换排序规则?
How cast collation when inserting data with different collation?
我想将数据从 table 复制到另一个具有不同排序规则的数据。
但是当我执行查询时,它 returns 出错了。
INSERT INTO [des].[dbo].TableDes
SELECT *
FROM [src].[dbo].TableSrc
Msg 468, Level 16, State 9, Line 1
Cannot resolve the collation conflict between "SQL_Latin1_General_CP1_CI_AS" and "Arabic_CI_AS" in the equal to operation.
当我们将数据从一个 COLLATION
移动到另一个
时,我们必须定义 COLLATION
INSERT INTO [des].[dbo].TableDes
SELECT col1,col2,... COLLATE Arabic_CI_AS
FROM [src].[dbo].TableSrc
我想将数据从 table 复制到另一个具有不同排序规则的数据。
但是当我执行查询时,它 returns 出错了。
INSERT INTO [des].[dbo].TableDes
SELECT *
FROM [src].[dbo].TableSrc
Msg 468, Level 16, State 9, Line 1
Cannot resolve the collation conflict between "SQL_Latin1_General_CP1_CI_AS" and "Arabic_CI_AS" in the equal to operation.
当我们将数据从一个 COLLATION
移动到另一个
COLLATION
INSERT INTO [des].[dbo].TableDes
SELECT col1,col2,... COLLATE Arabic_CI_AS
FROM [src].[dbo].TableSrc