Database Error Messages

Release
toggle
  • 23ai
  • 21c
  • 19c
Updated
Jun 24, 2024

QSM-01061

illegal query expression

Cause

An illegal query was specified. Specifically one of the following criteria was not satisfied: (a) All (non-constant, non-aggregate) SELECT expressions in the query should be made up of group expressions. (b) All column references in the HAVING clause should come from the GROUP BY expressions. (c) If there is an ORDER BY clause, then all column references should come from the GROUP BY or SELECT clause, depending on whether the query selects DISTINCT.


Action

Correct error in the syntax and rerun the query.