你的位置:首页 > 数据库

[数据库]Plsql 关于多列合并+判断


select tpc.cspcode as id ,
tpc.cspcode||'('||tc.cname||'--'|| DECODE(tsp.cpagedesc,'LENGTH(tsp.cpagedesc)>30','...',tsp.cpagedesc)||')' as text
from t_page_channels tpc
inner join t_channels tc
on tpc.ccode = tc.ccode
inner join t_spead_page tsp
on tpc.cpagecode = tsp.cpagecode
where 1 = 1