我特林执行下面的代码...串联在SQL无法正常运行
select a.name, a.phone, b.mobile, b.relation,
case
when a.phone<>'' and b.mobile<>'' then a.phone + ' ' + b.mobile
when a.phone<>'' and b.mobile='' then a.phone
when a.phone='' and b.mobile<>'' then b.mobile
else ''
end as phone
from abc a join bcdb where a.id=b.id and b.relation='a123'
但在执行第一种情况下,该值相加,而不是被连接在一起......你能不能请指导我
我得到错误,当我使用两个管道符号(||).. –
哪些数据类型的列和什么是你的RDBMS - SQL Server,MySQL? – TMNT2014
发布您在问题中收到的错误。 – Kermit