ORA-32618: incorrect use of MODEL PREVIOUS function
The previous() can only be used within the iterate … until clause of a model statement.
Because this function is used outside of the iterate clause, the following statement throws the ORA-32618: incorrect use of MODEL PREVIOUS function error:
select *
from
dual
model
dimension by (0 as id )
measures (0 as num)
rules
(
num[iteration_number] = previous(num[iteration_number])
);