Skip to content

Commit

Permalink
Merge pull request #384 from niphlod/fix/382
Browse files Browse the repository at this point in the history
fixes #382
  • Loading branch information
gi0baro committed Jun 27, 2016
2 parents dba8fa8 + 9e81544 commit 831f562
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 831f562

Please sign in to comment.