How to fix the Oracle error ORA-36160: (XSMXAGGR04) You cannot use string on scalar VARIABLE workspace object.?

In this post, you’ll learn more about the Oracle ErrorORA-36160: (XSMXAGGR04) You cannot use string on scalar VARIABLE workspace object. with the details on why you receive this error and the possible solution to fix it.

Oracle Error Description

ORA-36160: (XSMXAGGR04) You cannot use string on scalar VARIABLE workspace object.

Reason for the Error ORA-36160: (XSMXAGGR04) You cannot use string on scalar VARIABLE workspace object.

The user tried to run the AGGREGATE or AGGCOUNT command or function on a scalar variable.

How to fix the Error ORA-36160: (XSMXAGGR04) You cannot use string on scalar VARIABLE workspace object. ?

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

Specify a dimensioned variable instead