Working with rownum (Oracle)
843854Jan 4 2002 — edited Jan 7 2002When using JSP to retrieve results,
SELECT * FROM (SELECT pub, class, startdate, adtext FROM classifieds WHERE (pub='KWR') AND (startdate<='04-Jan-02') ORDER BY pub) WHERE rownum<=25
Will return the first 25 rows even if there are more. I am told that I CAN specify a range but when I do this:
SELECT * FROM (SELECT pub, class, startdate, adtext FROM classifieds WHERE (pub='KWR') AND (startdate<='04-Jan-02') ORDER BY pub) WHERE rownum=>1 AND rownum<=50
I get the following error:
Exception=java.sql.SQLException: ORA-00936: missing expression Just wondering if anyone notices what I am missing...