--显示指定排序规则 if object_id('ta')is not null drop table ta go create table ta([name] varchar(10) collate Albanian_CI_AI_WS) if object_id('tb')is not null drop table tb go create table tb([name] varchar(10) collate Chinese_PRC_CI_AI_WS) select * from ta ,tb where ta.[name]=tb.[name] /* 返回錯誤信息: 訊息 468,層級 16,狀態 9,行 2 無法解析 equal to 作業中 "Chinese_PRC_CI_AI_WS" 與 "Albanian_CI_AI_WS" 之間的定序衝突。 上述错误是因为排序规则不一致造成的 */ --要排除这个错误,簡單的方法是表连接时指定它的排序规则 select * from ta ,tb where ta.[name]=tb.[name]collate Chinese_PRC_CI_AI_WS
select * from ta ,tb where cast(ta.[name] as varbinary(max))=cast(tb.[name] as varbinary(max))这样也可以
if object_id('ta')is not null drop table ta
go
create table ta([name] varchar(10) collate Albanian_CI_AI_WS)
if object_id('tb')is not null drop table tb
go
create table tb([name] varchar(10) collate Chinese_PRC_CI_AI_WS)
select * from ta ,tb where ta.[name]=tb.[name]
/*
返回錯誤信息:
訊息 468,層級 16,狀態 9,行 2
無法解析 equal to 作業中 "Chinese_PRC_CI_AI_WS" 與 "Albanian_CI_AI_WS" 之間的定序衝突。
上述错误是因为排序规则不一致造成的
*/
--要排除这个错误,簡單的方法是表连接时指定它的排序规则
select * from ta ,tb where ta.[name]=tb.[name]collate Chinese_PRC_CI_AI_WS
我没办法修改查询啊!
我仅仅是想用这个运行程序生成一个数据库 .doc文档
谢谢楼上两位了!
我没办法修改查询啊!
我仅仅是想用这个运行程序生成一个数据库 .doc文档
谢谢楼上两位了!