Re: Hotsos Symposium, Day 1

  • From: Thomas Day <tomday2@xxxxxxxxx>
  • To: oracle-l@xxxxxxxxxxxxx
  • Date: Tue, 8 Mar 2005 08:28:11 -0500

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

Other related posts: