解决办法: Cannot resolve the collation conflict between "Japanese_CI_AS" and "SQL_...
来源:互联网 发布:铜陵网络买花花店 编辑:程序博客网 时间:2024/05/16 12:49
问题描述:今天在执行创建视图操作的时候,出现了如下错误
Cannot resolve the collation conflict between "Japanese_CI_AS" and "SQL_Latin1_General_CP1_CI_AS" in the equal to operation.
问题原因:在不同数据库之间进行查询时,由于collation(服务器的排序规则)设置不同造成的。
解决办法:方法① 把DB的collation更改成相同值 // TODO:参见另一篇文章(待编辑)。
方法② 在SQL中指定collation,如下红色部分:
CREATE VIEW [dbo].[VWInter]
AS
SELECT I.ID, I.Types, P.Value
FROM Common.dbo.Inter AS I
INNER JOIN dbo.Pref AS P
ON I.Source = P.Keys COLLATE database_default --用当前执行Sql的DB的默认字符集collation
-- 或者
-- ON I.Source = P.Keys COLLATE Japanese_CI_AS --指定具体的collation
〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜〜
2017年8月10日16:35:22
无论是在创建表或试图中,还是在insert/update语句中,都可能会因为不同DB间的collation设置不同,造成在两个或多个表的条件字段上出现collation问题。如果是sql执行过程中出现该问题,可以将sql条件字段后面设置成对应的字符集的collation(也就是像上面sql写的那样后面加一个指定),但是这种情况仍可能会出现成功执行了sql,但是存入DB的数据出现乱码。
注:本文原创由`bluetata`发布于blog.csdn.net、转载请务必注明出处。
- 解决办法: Cannot resolve the collation conflict between "Japanese_CI_AS" and "SQL_...
- Cannot resolve the collation conflict between "Chinese_PRC_CI_AS" and "Chinese_Taiwan_Stroke_CI_AS"
- Cannot resolve the collation conflict between "SQL_Latin1_General_CP1_CI_AS" and "Chinese_PRC_CI_AI"
- Cannot resolve the collation conflict between "SQL_Latin1_Gen
- Cannot resolve the collation conflict between "Chinese_PRC_CI_AS" and "SQL_L及由于排序规则不同导致查询结果为空的问题
- sql左连接时发生字符集错误Cannot resolve the collation conflict between in the equal to operation.
- Cannot resolve collation conflict for UNION operation.
- the collation conflict between "chinese_prc_ci_as" and "sql_latin1_general_cp1_ci_as" in the equal t
- Cannot resolve collation conflict for equal to operation.
- Cannot resolve collation conflict for equal to operation
- Cannot resolve collation conflict for equal to operation.
- "Cannot resolve collation conflict for column 1 in SELECT statement."
- 如何解决错误Cannot resolve collation conflict for DISTINCT operation?
- SQL Server: collation conflict between "Chinese_PRC_CI_AS" and "SQL_Latin1_General_CP1_CI_AS"
- 解决SQL 的 Collation 问题:Cannot resolve collation conflict for equal to operation.
- 解决SQL 的Cannot resolve collation conflict for column 6 in SELECT statement.报错
- SQL语句进行left join的时候发生Cannot resolve collation conflict for equal to operation.错误 SQL语句进行left join的时候发生Cannot resolve collation
- Cannot resolve symbol *** 解决办法
- fcntl更改阻塞与非阻塞模式&读取鼠标键盘值
- Opengl简单图像处理
- Qt软件开发文档14---聊天窗口的实现,对QlistWidget点击item项隐藏虚线框的实现
- 拦截器与过滤器的区别
- java基础知识(System.currentTimeMillis())
- 解决办法: Cannot resolve the collation conflict between "Japanese_CI_AS" and "SQL_...
- 缺省Servlet缓存问题
- FGD(三)
- C# 音乐播放器的设计
- 【Linux】IPC通信之信号量
- 深入理解MVC
- intel SSE AVX资料
- 你的文件你来掌控【巴别鸟Web 4.2版更新】
- 直播技术点整理-链接