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

Home -> Community -> Usenet -> c.d.o.server -> Re: How to generate a list of dates between two dates?

Re: How to generate a list of dates between two dates?

From: TurkBear <johng_at_mm.com>
Date: Tue, 11 Jan 2000 19:16:49 GMT
Message-ID: <387c80e7.74492504@204.181.81.99>

It does it by adding the rownum ( it will be 1 to 100) to the current sysdate ; adding a number to the sysdate i increases the date by {number} days, since sysdate is basically a number-of-days-since-base-date value so you just add days to it to get a future date...  

Michael Rothwell <marothwell_at_yahoo.com> wrote:

>Ok, I had to run this query just to see what it did.
>
>It does indeed return a list of dates for the next 100 days. But How does
>it do it. This makes no sense to me.
>
>
>
>Vincent Wittlin wrote:
>
>> Try This :
>>
>> Select sysdate + Rownum from cat,cat,cat
>> where rownum <= 100;
>>
>> Michael Keppler <Michael.Keppler_at_gmx.de> a écrit dans le message :
>> 85fjn5$b6s_at_TGZ3...
>> > Hi everybody !
>> >
>> > For a query I need all (possible) dates between two given dates. Is
>> > there a simple query to generate all of them ? Or do I have to use a
>> > table with all the dates in it?
>> >
>> > Ciao and Thanks, Michael.
>> >
>> > --
>> > Michael Keppler, MCSE, MCP+I
>> > IT logic GbR
>> > Michael.Keppler_at_gmx.de
>> >
>> >
>> >

  -----------== Posted via Newsfeeds.Com, Uncensored Usenet News ==----------    http://www.newsfeeds.com The Largest Usenet Servers in the World! ------== Over 73,000 Newsgroups - Including Dedicated Binaries Servers ==----- Received on Tue Jan 11 2000 - 13:16:49 CST

Original text of this message

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