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!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

wrong result of 11gR2 Recursive with clause

Aketi JyuuzouApr 8 2010 — edited Apr 8 2010
This thread is continued from 1056886
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
with rec(dayc,LV) as(
select cast(date '2010-04-15' as date),1 from dual
union all
select cast(dayc+1 as date),LV+1
  from rec
 where LV<= 3)
select * from rec;

DAYC             LV
--------  ---------
10-04-15          1
10-04-14          2
10-04-13          3
10-04-12          4
Why column DAYC is decreased ?
I think correct resultSet is below
DAYC             LV
--------  ---------
10-04-15          1
10-04-16          2
10-04-17          3
10-04-18          4
This post has been answered by MichaelS on Apr 8 2010
Jump to Answer

Comments

Processing
Locked Post
New comments cannot be posted to this locked post.

Post Details

Locked on May 6 2010
Added on Apr 8 2010
6 comments
2,626 views