You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@empire-db.apache.org by "Rainer Döbele (JIRA)" <em...@incubator.apache.org> on 2013/09/13 12:34:51 UTC

[jira] [Created] (EMPIREDB-192) Implement limitRows and skipRows for Oracle

Rainer Döbele created EMPIREDB-192:
--------------------------------------

             Summary: Implement limitRows and skipRows for Oracle
                 Key: EMPIREDB-192
                 URL: https://issues.apache.org/jira/browse/EMPIREDB-192
             Project: Empire-DB
          Issue Type: Improvement
    Affects Versions: empire-db-2.4.2
            Reporter: Rainer Döbele
            Assignee: Rainer Döbele


Currently only limitRows is supported for Oracle with the limitation of a potentially incorrect order of the rows.
Properly implement limitRows and skipRows by wrapping the select command like follows:
for limit rows only:
SELECT * FROM (
  SELECT .... ORDER BY ...
) row_ WHERE rownum<={limit}

for limitRows and skipRows:
SELECT * FROM (SELECT row_.*, rownum rownum_ FROM (
 SELECT .... ORDER BY ...
)) row_ WHERE rownum<={skip+limit}) WHERE rownum_>{skip}


--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira