Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

model clause/dual table issue?

523861Dec 21 2011 — edited Dec 22 2011
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?
This post has been answered by odie_63 on Dec 22 2011
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jan 19 2012
Added on Dec 21 2011
5 comments
292 views