Group By All Non-Aggregated Columns not listing all non-aggregated columns
CorvetteFan
Posts: 2 New member
When I use the super handy Group By All Non-Aggregated Columns feature of SQL prompt, I've often seen it not list all of the columns it should out of the non-aggregated ones. Does length or complexity of the script affect it? Also, does the order you have columns in the select list affect it (i.e, let's say CASE statements are in use and/or the aggregated columns are mixed up throughout the select list rather that bunched up towards the end of the select list together)?
Tagged:
Answers
Thanks for reaching out on the Redgate forums and apologies for the delay in a reply on this one.
I've attempted some replications but aren't quite getting the same outcome.
Can you confirm your SQL Prompt version and perhaps provide a screenshot of values that are missing from your expected output.
Selection order shouldn't have a bearing on this, but happy to do some more testing to be more definitive on that one.
If you have some extra info and the product version that would be greatly appreciated.
Here is my select (the one aggregated column pointed out):
Here is the Group By it created:
It is missing quite a few columns. Some examples are
a.model_number AS ModelNumber,
a.manufacturer AS Manufacturer,
c.description AS Category,
here is the SQP Prompt Version:
I tried refreshing suggestions and re-doing it and got the same results.
Any idea what would cause this?
Thanks!