【发布时间】:2010-04-20 08:36:38
【问题描述】:
我有两个查询:
第一个不起作用:
select hotels.TargetCode as TargetCode from hotels
union all
select DuplicatedObjects.duplicatetargetCode as TargetCode
from DuplicatedObjects where DuplicatedObjects.objectType=4
因为我得到错误:
Cannot resolve collation conflict for column 1 in SELECT statement.
第二部作品:
select hotels.Code from hotels where hotels.targetcode is not null
union all
select DuplicatedObjects.duplicatetargetCode as Code
from DuplicatedObjects where DuplicatedObjects.objectType=4
结构:
Hotels.Code -PK nvarchar(40)
Hotels.TargetCode - nvarchar(100)
DuplicatedObjects.duplicatetargetCode PK nvarchar(100)
【问题讨论】:
-
这里C#的相关性是什么?
-
@John Skeet 我已经更正了
标签: sql sql-server-2005