Hi all, just experimenting with the Model clause using:
Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 - Production
this:
with t as (select 1 num, 1 lvl from dual)
select num, f1
from t
MODEL
dimension by (lvl)
measures (num f1, num f2)
rules iterate(3)
(f1[any] = f1[cv()] + f2[cv()]);
works fine
this:
with t as (select 1 num, 1 lvl from dual connect by level <= 1)
select num, f1
from t
MODEL
dimension by (lvl)
measures (num f1, num f2)
rules iterate(3)
(f1[any] = f1[cv()] + f2[cv()]);
results in
ORA-32614: illegal MODEL SELECT expression
32614. 00000 - "illegal MODEL SELECT expression"
*Cause: An expression other than MODEL aliases, constants,
or expressions of the two is specified in the
MODEL SELECT clause.
*Action: Reformulate the query, perhaps nesting inside another SELECT.
Error at Line: 2 Column: 7
what's going on?