Pagination is broken when combined with group by on SQL Server 2000 #367

Closed
pschambacher opened this Issue Apr 9, 2013 · 0 comments

Projects

None yet

2 participants

@pschambacher
Contributor

The pagination additional condition is added at the end of the query before the ORDER BY clause. If there is a GROUP BY this is what happens:`

SELECT * FROM XXX WHERE YYY GROUP BY ZZZ AND PAGINATION_CONDITION

I'm already working on fixing it myself. I think I've got it right but I'm still not getting the same results that I have with SQL Server 2005 so I'll check what's going on before the pull request.

@kares kares added a commit that closed this issue Apr 9, 2013
@pschambacher @kares pschambacher + kares Fix #367 pagination not working with group on SQLSERVER 2000.
The pagination condition was added before the ORDER condition.
If there is a GROUP BY clause, the pagination was in the GROUP BY
instead of the WHERE clause. New approach is extraction each clause and
build a new proper query.
8e85d2f
@kares kares closed this in 8e85d2f Apr 9, 2013
@kares kares reopened this Apr 9, 2013
@kares kares closed this May 3, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment