select tpc.cspcode as id , tpc.cspcode||'('||tc.cname||'--'|| DECODE(tsp.cpagedesc,'LENGTH(tsp.cpagedesc)>30','...',tsp.cpagedesc)||')' as text from t ...
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