Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I have the following script and I can't for the life of me figure out why the sum isn't working, can anyone see anything that I'm missing?
It seems to fail with an invalid expression on the sum but I really don't know why!!
You need to either add the other fields not getting aggregated in your Group By Statement or you need to remove them from this resident load.
All the fields which are not aggregated need to show up in Group By Statement.
You need to either add the other fields not getting aggregated in your Group By Statement or you need to remove them from this resident load.
All the fields which are not aggregated need to show up in Group By Statement.
Yes I can see the issue.
Your LOAD statement lists a lot of fields (2nd, 3rd and 4th) without aggregation functions that are not specified in the GROUP BY clause. This is forbidden. Either specify them inside an aggregation function call, or list them in the GROUP BY clause.
Best,
Peter