Oracle Error ORA-32618: incorrect use of MODEL PREVIOUS function

Oracle Error Message

ORA-32618: incorrect use of MODEL PREVIOUS function

Reason for the Error

The MODEL PREVIOUS function was used outside of MODEL “ITERATE UNTIL” clause, or was nested.

Solution

Check the SQL statement and rewrite if necessary.