Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Mailing Lists -> Oracle-L -> Re: Hotsos Symposium, Day 1
I guess that what I don't understand is why the 1=1 is in there at
all. The following produces 365 rows of output for me. Does the 1=1
perform a useful function? I understand that it evaluates as true. I
don't understand why you feel it's needed.
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
/
--
http://www.freelists.org/webpage/oracle-l
Received on Tue Mar 08 2005 - 12:34:26 CST