Commits

Mike Bayer committed c681c72

tweak to oracle limit/offset to not put ora_rn in the select list

  • Participants
  • Parent commits 047be8d

Comments (0)

Files changed (1)

File lib/sqlalchemy/databases/oracle.py

             else:
                 orderby = "rowid ASC"
             select.append_column(sql.ColumnClause("ROW_NUMBER() OVER (ORDER BY %s)" % orderby).label("ora_rn"))
-            limitselect = select.select()
+            limitselect = sql.select([c for c in select.c if c.key!='ora_rn'])
             if select.offset is not None:
                 limitselect.append_whereclause("ora_rn>%d" % select.offset)
                 if select.limit is not None: