0select * from
(0select a.*,rownum as my_sys_rownum from (
0select deptid,nvl(bdzname,’ ’),nvl(vollevel,’0’),zbrl,nvl(zbts, ’0’),
nvl(fzr,’0’),nvl(deptiddes,’ ’),nvl(tel,’ ’),nvl(runstatedes,’ ’),
nvl(address,’ ’),bdzid from v_bdz where rownum<2000
and zbrl is null
) a
union
0select b.*,rownum (0select count(*) from (
0select deptid,nvl(bdzname,’ ’),nvl(vollevel,’0’),zbrl,nvl(zbts, ’0’),
nvl(fzr,’0’),nvl(deptiddes,’ ’),nvl(tel,’ ’),nvl(runstatedes,’ ’),
nvl(address,’ ’),bdzid from v_bdz where rownum<2000
and zbrl is null
)) as my_sys_rownum from (
0select deptid,nvl(bdzname,’ ’),nvl(vollevel,’0’),zbrl,
nvl(zbts, ’0’),nvl(fzr,’0’),
nvl(deptiddes,’ ’),nvl(tel,’ ’),nvl(runstatedes,’ ’),
nvl(address,’ ’),bdzid from v_bdz where rownum<2000
and zbrl is not null order by zbrl
) b
)
order by my_sys_rownum desc |