Master Mainframe Technologies - COBOL, JCL, DB2, VSAM, CICS & More
ABEND Codes SQLCODEs File Status Interview Prep Contact
← Back to SQLCODE Reference
Error

SQLCODE -119

HAVING without GROUP BY

Explanation

HAVING clause used without GROUP BY clause.

Solution

Add GROUP BY clause or remove HAVING. HAVING filters groups, not rows.

Example

SELECT * FROM EMP HAVING SAL > 1000 -- Use WHERE instead