Oracle Solution for Error ora-36765

Solution for Oracle Error ORA-36765

ORA-36765: (XSAGGCNTMOVE03) A string aggregation variable cannot have a string AGGCOUNT.

What triggered the Error:

The specified AGGCOUNT variable did not have the same permanence as the aggregation variable.

What should we do to fix it:

Select an AGGCOUNT variable with the same TEMPORARY or PERMANENT attribute as the aggregation variable.