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

[BUG] Incorrect syntax error in GROUP BY clause #598

Closed
hiroyuki0415 opened this issue Dec 3, 2024 · 0 comments · Fixed by #602
Closed

[BUG] Incorrect syntax error in GROUP BY clause #598

hiroyuki0415 opened this issue Dec 3, 2024 · 0 comments · Fixed by #602

Comments

@hiroyuki0415
Copy link

SELECT   s.uniquename,
         MAX(IIF (s.uniquename = 'xxx', COALESCE (sc.componenttype, -1), NULL)) AS [aggregation]
FROM     solution AS s
         INNER JOIN
         solutioncomponent AS sc
         ON s.solutionid = sc.solutionid
GROUP BY s.uniquename;

When I run this SQL I get the below error:

Msg 102, Level 15, State 1, Line 1
Incorrect syntax near 'COALESCE (sc.componenttype, -1)'.

Msg 102, Level 15, State 1, Line 1
Incorrect syntax near 'COALESCE (sc.componenttype, -1)'.

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 a pull request may close this issue.

1 participant