17,086
社区成员
发帖
与我相关
我的任务
分享
select cpid, lang, spshortname, spname, status, credit, contact, contacttel
from (select distinct a.cpid,
c.lang,
nvl((select b.value
from t_cp_infoext b
where b.object_id = a.object_id
and lower(b.name) = 'shortname'
and c.lang = b.lang),
' ') spshortname,
nvl((select b.value
from t_cp_infoext b
where b.object_id = a.object_id
and lower(b.name) = 'name'
and c.lang = b.lang),
' ') spname,
a.status,
a.credit,
a.contact,
a.contacttel
from t_cp_info a, t_cp_infoext c)
where spshortname <> ' '
or spname <> ' '
order by 1
select a.cpid,
b.lang,
nvl(max(decode(lower(b.name), 'shortname', b.value, null)), ' ') as spshortname,
nvl(max(decode(lower(b.name), 'name', b.value, null)), ' ') as spname,
a.status,
a.credit,
a.contact,
a.contacttel
from t_cp_info@dblink01 a,
t_cp_infoext@dblink01 b
where lower(b.name) in ('shortname', 'name')
and b.object_id = a.object_id
group by a.cpid,
b.lang,
a.status,
a.credit,
a.contact,
a.contacttel
order by 1,2
select a.cpid, c.lang,
nvl(max(decode(lower(b.name),'shortname',b.value,null)),' ') as spshortname,
nvl(max(decode(lower(b.name),'name',b.value,null)),' ') as spname, a.status, a.credit, a.contact, a.contacttel
from t_cp_info a, t_cp_infoext c,t_cp_infoext b
where lower(b.name) in ('shortname','name')
and b.object_id = a.object_id
and c.lang = b.lang
group by a.cpid, c.lang, spshortname, spname, a.status, a.credit, a.contact, a.contacttel
order by 1