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!

ORA-01790 from 11gR2 Recursive with clause

Aketi JyuuzouApr 7 2010 — edited Apr 8 2010
I guess below result is bug.
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 tmp(day1) as(select date '2009-06-01' from dual),
  2  rec(day1) as(
  3  select day1 from tmp
  4  union all
  5  select add_months(day1,1)
  6    from rec
  7   where add_months(day1,1) < date '2010-05-05')
  8  select * from rec;
select add_months(day1,1)
       *
行5でエラーが発生しました。:
ORA-01790: 式には対応する式と同じデータ型を持つ必要があります
I suppose above two expression is same data type,because below SQL is executable.
with tmp(day1) as(select date '2009-06-01' from dual)
select day1 from tmp
union all
select add_months(day1,1) from tmp;

day1
--------
09-06-01
09-07-01
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on May 6 2010
Added on Apr 7 2010
5 comments
3,388 views