I have this query:
SELECT *
FROM (
SELECT v.*,
ROWNUM recnum
FROM (
SELECT hostaddress,
modulename,
severity,
escalation,
classification,
description,
remarks,
count(remarks) AS tally,
max(entrydate) AS lastupdate,
min(entrydate) AS firstupdate
FROM vw_ericsson_summary
GROUP BY hostaddress,
modulename,
severity,
classification,
escalation,
description,
remarks
ORDER BY lastupdate ASC
) v
)
WHERE ROWNUM BETWEEN 1 AND 100
This works okay. but when rownum is greater than 100 such as 101, it won't return records anymore.
SELECT *
FROM (
SELECT v.*,
ROWNUM recnum
FROM (
SELECT hostaddress,
modulename,
severity,
escalation,
classification,
description,
remarks,
count(remarks) AS tally,
max(entrydate) AS lastupdate,
min(entrydate) AS firstupdate
FROM vw_ericsson_summary
GROUP BY hostaddress,
modulename,
severity,
classification,
escalation,
description,
remarks
ORDER BY lastupdate ASC
) v
)
WHERE ROWNUM BETWEEN 101 AND 200;
Although records are actually greater than 100, (it's 128). I'm using Oracle for Toad.
Is there any other way of returning s specified row number from a selection such as above?