I have the first query that works. But then I added ROWNUM column to try to paginate the results. Now it seems to just times out without returning any results. Do not understand the issue here on the Oracle database.
// Working
select
tablea.*
from
(select
vcell.operator_name, vcell.vendor_name,
v_territory.territory_label as Region,
v_zone.zone_short_name as Zone, v_cluster.cluster_nm,
vcell.engineering_number, v_location.loc_site_long_nm as Name,
vcell.Band infoband, vcell.Freq_Band infofreqband,
vcell.Carrier infocarr, vcell.channel_bandwidth infobandwidth,
vcell.cell_type infocelltype, vcell.enodeb_id infoenbid,
vcell.local_cell_id infocellid, vcell.ecell_name infocellname,
vcell.Sector infosector, vcell.Channel infochannel,
vcell.physical_cell_id infopci, vcell.TAC infotac,
tbl.*
from
cim.v_zone v_zone, cim.v_cluster v_cluster,
cim.v_territory v_territory, cim.v_location v_location,
cim.v_cell_lte vcell, netact_b_lnd.SRAN_CELL_LNCEL tbl
where
v_zone.zone_label = '9'
and v_location.operator_name = 'Base'
and vcell.operator_name = 'Box'
and vcell.vendor_name = 'N'
and v_zone.zone_id = v_cluster.zone_id
and v_territory.territory_id = v_zone.territory_id
and v_cluster.cluster_id = v_location.cluster_id
and vcell.engineering_number = v_location.engineering_number
and SUBSTR(tbl.DISTNAME, INSTR(tbl.DISTNAME,'LNBTS-',1) + 6, 6) = vcell.enodeb_id
and REPLACE(SUBSTR(tbl.DISTNAME, INSTR(tbl.DISTNAME, 'LNCEL-', 1) + 6, INSTR(SUBSTR(tbl.DISTNAME || '/', INSTR(tbl.DISTNAME,'LNCEL-',1) + 6, 4),'/',1)),'/','') = vcell.local_cell_id
order by tbl.distname) tablea
// Not working
select
tablea.*, ROWNUM
from
(select
vcell.operator_name, vcell.vendor_name,
v_territory.territory_label as Region,
v_zone.zone_short_name as Zone, v_cluster.cluster_nm,
vcell.engineering_number, v_location.loc_site_long_nm as Name,
vcell.Band infoband, vcell.Freq_Band infofreqband,
vcell.Carrier infocarr,vcell.channel_bandwidth infobandwidth,
vcell.cell_type infocelltype, vcell.enodeb_id infoenbid,
vcell.local_cell_id infocellid,vcell.ecell_name infocellname,
vcell.Sector infosector, vcell.Channel infochannel,
vcell.physical_cell_id infopci, vcell.TAC infotac,
tbl.*
from
cim.v_zone v_zone,cim.v_cluster v_cluster,
cim.v_territory v_territory, cim.v_location v_location,
cim.v_cell_lte vcell, netact_b_lnd.SRAN_CELL_LNCEL tbl
where
v_zone.zone_label = '9'
and v_location.operator_name = 'Base'
and vcell.operator_name = 'Box'
and vcell.vendor_name = 'N'
and v_zone.zone_id = v_cluster.zone_id
and v_territory.territory_id = v_zone.territory_id
and v_cluster.cluster_id = v_location.cluster_id
and vcell.engineering_number = v_location.engineering_number
and SUBSTR(tbl.DISTNAME, INSTR(tbl.DISTNAME,'LNBTS-',1) + 6, 6) = vcell.enodeb_id
and REPLACE(SUBSTR(tbl.DISTNAME, INSTR(tbl.DISTNAME,'LNCEL-',1) + 6, INSTR(SUBSTR(tbl.DISTNAME || '/', INSTR(tbl.DISTNAME,'LNCEL-',1) + 6, 4),'/',1)),'/','') = vcell.local_cell_id
order by tbl.distname) tablea
where
ROWNUM <= 5
I was following this page to do pagination on Oracle database.
https://blogs.oracle.com/connect/post/on-rownum-and-limiting-results
New contributor
Sanjaya Kasun is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
1