How to fix the Oracle error PLS-00119: Duplicate having-clause in table expression?

In this post, you’ll learn more about the Oracle ErrorPLS-00119: Duplicate having-clause in table expression with the details on why you receive this error and the possible solution to fix it.

Oracle Error Description

PLS-00119: Duplicate having-clause in table expression

Reason for the Error PLS-00119: Duplicate having-clause in table expression

Two or more HAVING clauses were found in a SELECT statement. The HAVING clause specifies a condition under which groups of rows (formed by the GROUP BY clause) are included in the result. The condition can include several logical expressions connected by AND or OR, but a statement can contain only one HAVING clause.

How to fix the Error PLS-00119: Duplicate having-clause in table expression ?

You can fix this error in Oracle by following the below steps

Remove one of the HAVING clauses and, if necessary, connect logical expressions by AND or OR.

Tags :

Leave Your Comment