In this blog post, let’s learn about the error message “4012 Column referencename must be a grouping column or be specified within an aggregate. On this grouped table a star reference is not allowed.” when working with HPE NonStop SQL/MX, the reason for the error and the solution to fix this error message.
Error Message
4012 Column referencename must be a grouping column or be specified within an aggregate. On this grouped table a star reference is not allowed.
Reason for the Error
You referred to column name with a SELECT * or SELECT TBL.* reference. Column name must be a grouping column or be specified within an aggregate.
Solution
Correct the syntax and resubmit