SQL语句:
(select top 1 [egrp_name] from [Enotify Group] where [egrp_id] in (a.grp_id) )
a.grp_id
的值为'0,1145'
,我收到错误
Conversion failed when converting the varchar value '0,1145' to data type int.
有人可以告诉我如何在上述情况下将'0,1145'
更改为0,1145
答案 0 :(得分:0)
select top 1 [egrp_name]
from [Enotify Group]
where [egrp_id] in (cast(replace(grp_id, ',', '.') as decimal))