Column AOCKDT or expression in HAVING clause not valid.
Message ID: SQL0119
Cause . . . . . : One of the following has occurred: -- Column AOCKDT specified in a HAVING clause is not within an aggregate function and is not in the GROUP BY clause. -- An expression specified in a HAVING clause is not within an aggregate function and is not in the GROUP BY clause.
Recovery . . . : Remove the column or expression from the HAVING clause or add the column or expression to the GROUP BY clause. Try the request again.
where : executed before group by
having : executed after group by
Best Regards, Guy Przytula
Database Software Consultant
Good DBAs are not formed in a week or a month. They are created little by little, day by day. Protracted and patient effort is needed to develop good DBAs.
Spoon feeding : To treat (another) in a way that discourages independent thought or action, as by overindulgence.
DB2 UDB LUW Certified V7-V8-V9-V9.7-V10.1-V10.5 DB Admin - Advanced DBA -Dprop..
Information Server Datastage Certified http://www.infocura.be