尝试加入两个 ID 字段时出现以下错误:
select top 10 *
from SOURCECODE as s
inner join APPEAL as a on s.APPEALID = a.APPEALID;
错误:
Conversion failed when converting from a character string to uniqueidentifier.
关于如何修复它有什么想法吗?
我需要转换字段吗?
s.appealid
是nvarchar 36
a.appealid
是uniqueidentifier
SELECT TOP 10 *
FROM SOURCECODE AS s
INNER JOIN APPEAL AS a ON CONVERT(uniqueidentifier, s.APPEALID) = a.APPEALID;