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!

To use "analytic function" at "recursive with clause"

Aketi JyuuzouJan 3 2012 — edited Jan 23 2012
http://docs.oracle.com/cd/E11882_01/server.112/e26088/statements_10002.htm#i2077142

The recursive member cannot contain any of the following elements:
・An aggregate function. However, analytic functions are permitted in the select list.


OK I will use analytic function at The recursive member :-)
SQL> select * from v$version;

BANNER
-------------------------------------------------------
Oracle Database 11g Release 11.2.0.1.0 - Production
PL/SQL Release 11.2.0.1.0 - Production
CORE    11.2.0.1.0      Production
TNS for 32-bit Windows: Version 11.2.0.1.0 - Production
NLSRTL Version 11.2.0.1.0 - Production

SQL> with rec(Val,TotalRecCnt) as(
  2  select 1,1 from dual
  3  union all
  4  select Val+1,count(*) over()
  5    from rec
  6   where Val+1 <= 5)
  7  select * from rec;
select * from rec
              *
ERROR at line 7:
ORA-32486: unsupported operation in recursive branch of recursive WITH clause
Why ORA-32486 happen ?:|
This post has been answered by BobLilly on Jan 3 2012
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Feb 20 2012
Added on Jan 3 2012
4 comments
1,568 views