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

Tory.berra/fix/invalid group clause #21

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

VictorioBerra
Copy link

Fixes #18

Editor .NET needs to include both value and label in the group clause. With SqlServer, you will get "Column '[sites].[x]' is invalid in the select list because it is not contained in either an aggregate function or the GROUP BY clause." if you provide two different columns (IE site.id and site.name).

I tested this on SQL Server, MySQL, Postgres, SQLite. Not Oracle but their docs show the same GROUP BY syntax as others...

Should not break backwards compatibility. I also tested using the same column in the GROUP BY clause twice, IE:

SELECT site.name AS value, site.name AS label
FROM sites
GROUP BY site.name, site.name

Works great across all RDBMSes.

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

Successfully merging this pull request may close these issues.

SearchBuilderOptions()/SearchPaneOptions() generated invalid code on SqlServer
1 participant