Last post Mar 16, 2017 09:24 PM by Lannie
Mar 15, 2017 10:38 AM|RickyBears9|LINK
I am trying to fetch 10 records with below query using rownum and then next 10. and so on......
rownum values are passing dynamically.
First 10 records are fetching perfectly but next time its not fetching.
select * from (SELECT Q.*,j.JNER,j.OJNER,j.STATEID as JSTATEID FROM QATION Q
inner join SSPJD j on Q.QID=j.QID WHERE Q.CREATEDBY = 'ricky'
and (Q.DATEOFVALIDITY >= (SELECT TO_CHAR (SYSDATE, 'DD-MON-YYYY') FROM DUAL) OR j.STATEID = 'Payment in Pending')
AND ((j.STATEID = 'Job Initiated') OR (j.STATEID = 'Payment in Progress')) order by Q.QID) where rownum>0 and rownum <=10;
with below query it's not working-
where rownum>10 and rownum <=20
Mar 16, 2017 09:24 PM|Lannie|LINK
what database are you using?
and you do know ROWNUM is not a static row identifier??