SQLCODE -119
SQL0119 Column not valid in HAVING
- IBM message text
- Column &1 or expression in HAVING clause not valid.
- SQLCODE
- -119
- SQLSTATE
- 42803
Most common cause
HAVING contains a column or expression that is neither in an aggregate function nor in GROUP BY.
Other causes
- A condition that belonged in WHERE was written in HAVING.
How to fix it
Move conditions on individual rows to WHERE, or add the column to GROUP BY.
Related errors
Text and codes from IBM documentation for 7.6. Checked on .