select distinct
r.Xingm as 姓名,
r.chushrq as 出生日期,
r.hukxzh as 户口性质,
po.xingm as 姓名,
po.chushrq as 出生日期,
po.hukxzh 户口性质,
zn.xingm as 姓名,
zn.xingb as 性别,
zn.chushrq as 出生日期,
b.cuoshzhl as 措施种类,
b.biyqshshj as 时间,
b.shishdw as 地点,
-- dsz.dushzhh as 独生证号,
--dsz.dushzhffshj as 领证时间,
--(case when r.hujd=po.hujd then )
t.jianglydje
from (select * from pis_p_jiangybzh) t
left join pis_p_renk r
on t.renkid = r.sysid
and t.juzhd = r.hujd
left join pis_p_biysh b
on r.sysid = b.renkid
left join pis_c_cuoshzhl cc
on cc.code = b.cuoshzhl
left join pis_p_guanx g
on g.renkid = r.sysid
and g.guanxlx = 10
left join pis_p_renk po
on po.sysid = g.guanxrid
and g.guanxlx = 10
and t.juzhd = po.hujd
left join pis_p_guanx gs
on r.sysid = gs.renkid
left join pis_p_renk zn
on gs.guanxrid = zn.sysid
left join pis_c_hukxzh c
on c.code = r.hukxzh
left join pis_c_hukxzh d
on d.code = po.hukxzh
where t.jianglydlx in (50,51,52, 53, 54)
and r.juzhd like '140105%'
and gs.guanxlx in (20, 30)
r.Xingm as 姓名,
r.chushrq as 出生日期,
r.hukxzh as 户口性质,
po.xingm as 姓名,
po.chushrq as 出生日期,
po.hukxzh 户口性质,
zn.xingm as 姓名,
zn.xingb as 性别,
zn.chushrq as 出生日期,
b.cuoshzhl as 措施种类,
b.biyqshshj as 时间,
b.shishdw as 地点,
-- dsz.dushzhh as 独生证号,
--dsz.dushzhffshj as 领证时间,
--(case when r.hujd=po.hujd then )
t.jianglydje
from (select * from pis_p_jiangybzh) t
left join pis_p_renk r
on t.renkid = r.sysid
and t.juzhd = r.hujd
left join pis_p_biysh b
on r.sysid = b.renkid
left join pis_c_cuoshzhl cc
on cc.code = b.cuoshzhl
left join pis_p_guanx g
on g.renkid = r.sysid
and g.guanxlx = 10
left join pis_p_renk po
on po.sysid = g.guanxrid
and g.guanxlx = 10
and t.juzhd = po.hujd
left join pis_p_guanx gs
on r.sysid = gs.renkid
left join pis_p_renk zn
on gs.guanxrid = zn.sysid
left join pis_c_hukxzh c
on c.code = r.hukxzh
left join pis_c_hukxzh d
on d.code = po.hukxzh
where t.jianglydlx in (50,51,52, 53, 54)
and r.juzhd like '140105%'
and gs.guanxlx in (20, 30)
解决方案 »
- pl/sql中如何全部依次执行if elsif分支?求高人指教
- oracle字符串问题
- 用 sqlplus 连接,都是用什么身份登陆的?normal,dba?
- describe一个表,返回值能放在ResultSet中吗?
- 问个关于安装客户端问题
- 求助:oracle8恢复问题
- oracle92中怪异问题
- 有关PLSQL Developer工具的问题
- 怎么样在过程中判断表是否存在,并DROP它......
- 系统有两台数据库服务器,在给表空间添加数据文件时,报ORA-15041: DISKGROUP SPACE EXHAUSTED
- WEBLOGIC服务定时启动语句,在线等
- web中oracle数据库连接问题
Blog: http://blog.csdn.net/tianlesoftware
网上资源: http://tianlesoftware.download.csdn.net
相关视频:http://blog.csdn.net/tianlesoftware/archive/2009/11/27/4886500.aspx
DBA1 群:62697716(满); DBA2 群:62697977