17,082
社区成员
发帖
与我相关
我的任务
分享
select B.GSJGH,nvl(b.sfzh,b.jbxx_zjhm) as sfzh,b.bzjgmc,b.jbxx_sskhq,b.khxm, b.jbxx_xb,b.jbxx_nl,b.jbxx_khjb,c.WH_KHJLXM,a.jydm,a.jymc,a.cq,a.khrq,a.jyrq,a.dqrq,a.jyje,c.jd_dz from
(select a.*,b.*,c.* from
lsb_ls a,
hxb_and_hzb b,
jt_jbxxb c
where (case when b.jydm in('010203','010503','010606','020131','700204','020613')
then -b.jyje
else b.jyje
end)
where nvl(b.sfzh,b.jbxx_zjhm)=c.jd_zjhm(+) and nvl(b.sfzh,b.jbxx_zjhm)=a.sfzh(+)
and b.gsjgh='56234585'
and (substr(a.jysj,1,10)>='2017-04-15' and substr(a.jysj,1,10)<='2017-05-15')
and jymc is not null;