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: A tricky sql date question

Re: A tricky sql date question

From: Corvax <corvax_kg_at_my-deja.com>
Date: Wed, 22 Nov 2000 12:47:26 GMT
Message-ID: <8vgf8s$hct$1@nnrp1.deja.com>

In article <8ve1b5$h64$1_at_nnrp1.deja.com>,   seanfour_at_my-deja.com wrote:
> Is there any way I can list the dates of all the days between 2 dates
> without looping through a select statement from dual? Basically I want
> to be able to give it, say '01-AUG-2001' and '01-AUG-2002' and have it
> spit back all of the dates between without having to hit the DB 365
> times to do it. Thanks for any help!!
>
> Sent via Deja.com http://www.deja.com/
> Before you buy.
>

There is one more way how you can select. select *
from <table>
where rownum <= (to_date('01-AUG-2001', 'DD-MON-YYYY') - to_date('01- AUG-2000', 'DD-MON-YYYY')) Sent via Deja.com http://www.deja.com/
Before you buy. Received on Wed Nov 22 2000 - 06:47:26 CST

Original text of this message

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