Skip to content

Commit

Permalink
fixes #382
Browse files Browse the repository at this point in the history
  • Loading branch information
niphlod committed Jun 26, 2016
1 parent dba8fa8 commit 9e81544
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions pydal/dialects/mssql.py
Original file line number Diff line number Diff line change
Expand Up @@ -244,9 +244,10 @@ def _rebuild_select_for_limit(self, fields, tables, dst, whr, grp, order,
f_iproxy = ', '.join([
self._as(o, n) for (o, n) in zip(f_inner, f_outer)])
f_oproxy = ', '.join(f_outer)
return 'SELECT%s %s FROM (' + \
interp = 'SELECT%s %s FROM (' + \
'SELECT%s ROW_NUMBER() OVER (%s) AS w_row, %s FROM %s%s%s)' + \
' TMP WHERE w_row BETWEEN %i and %i;' % (
' TMP WHERE w_row BETWEEN %i and %i;'
return interp % (
dst, f_oproxy, dst, order, f_iproxy, tables, whr, grp,
lmin, lmax
)
Expand Down

0 comments on commit 9e81544

Please sign in to comment.