How to fix the Oracle error ORA-36162: (XSMXAGGR05) COUNTVAR variable workspace object must be of type INTEGER, not string.?

In this post, you’ll learn more about the Oracle ErrorORA-36162: (XSMXAGGR05) COUNTVAR variable workspace object must be of type INTEGER, not string. with the details on why you receive this error and the possible solution to fix it.

Oracle Error Description

ORA-36162: (XSMXAGGR05) COUNTVAR variable workspace object must be of type INTEGER, not string.

Reason for the Error ORA-36162: (XSMXAGGR05) COUNTVAR variable workspace object must be of type INTEGER, not string.

The user specified a non-INTEGER variable as a COUNTVAR for aggregation

How to fix the Error ORA-36162: (XSMXAGGR05) COUNTVAR variable workspace object must be of type INTEGER, not string. ?

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

Redefine the COUNTVAR to be an INTEGER