RE: Hotsos Symposium, Day 1

  • From: "Eric Buddelmeijer" <Eric.Buddelmeijer@xxxxxxxxxx>
  • To: <tomday2@xxxxxxxxx>, <oracle-l@xxxxxxxxxxxxx>
  • Date: Tue, 8 Mar 2005 14:51:18 +0100

I tried it as well, both in sql plus and TOAD. SQL*plus gives just one row,
toad 25. I guess there is some setting to be done that determines the max
for the LEVEL. Haven't had time to look for that setting yet.

Kind regards,
Eric. 

-----Oorspronkelijk bericht-----
Van: oracle-l-bounce@xxxxxxxxxxxxx [mailto:oracle-l-bounce@xxxxxxxxxxxxx]
Namens Thomas Day
Verzonden: dinsdag 8 maart 2005 14:28
Aan: oracle-l@xxxxxxxxxxxxx
Onderwerp: Re: Hotsos Symposium, Day 1

I tried running the CONNECT BY example that you had.

SQL> SELECT TRUNC(SYSDATE,'YEAR') + LEVEL - 1
  2  FROM DUAL
  3  CONNECT BY 1 = 1
  4  AND LEVEL < TRUNC(SYSDATE+366,'YEAR') - TRUNC(SYSDATE,'YEAR') + 1;

TRUNC(SYS
---------
01-JAN-05

1 row selected.

I'm obvisously missing something.  What's with the 1=1?


  1  SELECT TRUNC(SYSDATE,'YEAR') + LEVEL - 1
  2  FROM DUAL
  3  CONNECT BY
  4  --1 = 1 AND
  5* LEVEL < TRUNC(SYSDATE+366,'YEAR') - TRUNC(SYSDATE,'YEAR') + 1
SQL> /

TRUNC(SYS
---------
01-JAN-05

1 row selected.
--
//www.freelists.org/webpage/oracle-l


--
//www.freelists.org/webpage/oracle-l

Other related posts: