Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SQL Server Limit Offset #49

Closed
hexus opened this issue Feb 27, 2017 · 2 comments
Closed

SQL Server Limit Offset #49

hexus opened this issue Feb 27, 2017 · 2 comments
Milestone

Comments

@hexus
Copy link
Contributor

hexus commented Feb 27, 2017

Implement this.

SELECT TOP {$limit} {$query_select} FROM (
    SELECT ROW_NUMBER() OVER (ORDER BY (SELECT 0)) AS row_number, {$query}...
) query_results WHERE row_number >= {$offset}
@hexus hexus modified the milestones: 0.5.1, 0.5.0 Apr 12, 2017
@hexus
Copy link
Contributor Author

hexus commented Apr 13, 2017

This is such a pain. Microsoft, why you gotta be such a pain?!

hexus added a commit that referenced this issue Apr 16, 2017
Fixed some documentation in Storage\Query.
@hexus
Copy link
Contributor Author

hexus commented Apr 16, 2017

Wasn't particularly fun, but all done now. Laravel does it nicely too; row_num between offset and limit.

@hexus hexus closed this as completed Apr 16, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant