我想在满足条件时显示基于 when 语句的多个字符串的串联。如下 :
select
case
when T1.Field is not null then 'T1,'
when T2.Field is not null then /*last results*/ + 'T2,'
when T3.Field is not null then /*last results*/ + 'T3,'
end
from T1
left outer join T2 on ...
left outer join T3 on ...