Re: Hotsos Symposium, Day 1

  • From: Martic Zoran <zoran_martic@xxxxxxxxx>
  • To: twaddell@xxxxxxxxxxxx, jonathan@xxxxxxxxxxx
  • Date: Tue, 8 Mar 2005 07:12:19 -0800 (PST)

Hi,

This is 99% SQL*Plus bug.
Even 10g SQL*Plus doing the same.

It is working properly from PL/SQL Developer.

I have also checked explain plan in both cases when
using dual or some new table x with one row.
The plan is totally the same in both cases.

That is all pointing it is SQL*PLus bug.

Regards,
Zoran

--- Michael Twaddell <twaddell@xxxxxxxxxxxx> wrote:
> 
> I'm running version 9204 and I receive only one row,
> but I think
> it has something to do with dual.  If I change the
> query to
> 
> SELECT TRUNC(SYSDATE,'YEAR') + LEVEL - 1
>    FROM (SELECT 'X' FROM DUAL WHERE rownum = 1)
>   CONNECT BY 1 = 1
>     AND LEVEL < TRUNC(SYSDATE+366,'YEAR') -
> TRUNC(SYSDATE,'YEAR') + 1
> 
> it works properly.  Also if I create a table, t,
> with only 1 row and
> substitute it for dual, it also works.
> 
> example:
> 
> SQL> create table t (c varchar2(1));
> 
> Table created.
> 
> SQL> insert into t values ('x');
> 
> 1 row created.
> 
> SQL> SELECT TRUNC(SYSDATE,'YEAR') + LEVEL - 1
>    2    from t
>    3   CONNECT BY 1 = 1
>    4   AND LEVEL < TRUNC(SYSDATE+366,'YEAR') -
> TRUNC(SYSDATE,'YEAR') + 1
>    5 /
> 
> TRUNC(SYS
> ---------
> 01-JAN-05
> 02-JAN-05
> 03-JAN-05
> 04-JAN-05
> 05-JAN-05
> 06-JAN-05
> 07-JAN-05
> .........
> .........
> 30-DEC-05
> 31-DEC-05
> 
> Regards,
> 
> Michael T.
> 
> 


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 
--
//www.freelists.org/webpage/oracle-l

Other related posts: