Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> Re: Hotsos Symposium, Day 1

Re: Hotsos Symposium, Day 1

From: Michael McMullen <ganstadba_at_hotmail.com>
Date: Tue, 8 Mar 2005 08:48:17 -0500
Message-ID: <BAY20-DAV2F516F91D35C52BD3DAB0A6500@phx.gbl>


Read the rest of the blog, it gives the solution for the problem you listed. ----- Original Message -----
From: "Thomas Day" <tomday2_at_gmail.com>
To: <oracle-l_at_freelists.org>
Sent: Tuesday, March 08, 2005 8:28 AM
Subject: 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.
> --
> http://www.freelists.org/webpage/oracle-l
>

--
http://www.freelists.org/webpage/oracle-l
Received on Tue Mar 08 2005 - 08:53:07 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US