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

Pagination with distinct #435

Closed
diegodfsd opened this issue Feb 15, 2018 · 3 comments
Closed

Pagination with distinct #435

diegodfsd opened this issue Feb 15, 2018 · 3 comments

Comments

@diegodfsd
Copy link

I'm using the latest version 5.1.283 and when I trying to execute a query like that
SELECT DISTINCT Id, Name, Email FROM [schema].[table]
the things not happen like expected because PetaPoco engine generate a query like that:
SELECT COUNT(DISTINCT Id, Name, Email) FROM [schema].[table]

I have already a solution to this problem and I'm using PetaPoco with this fix at this moment.

@asherber
Copy link
Collaborator

Can you please provide more information? What kind of database? Can you post a code snippet? What was your fix?

@diegodfsd
Copy link
Author

Hi @asherber ,

I'm using sql server 2014. About the problem, when I trying to execute any query with distinct and multiples columns an exception is thrown. I have no more details because the problem happened more than 8 months ago, but as I told before I have a solution and I can create a PR. What do you think?

@asherber
Copy link
Collaborator

Sure, thanks, a PR would be helpful.

@pleb pleb closed this as completed Sep 14, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants