Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.tools -> Re: How to search between dates
some thing like this
select 'Y' from tbale where id='123' and
start date not between v_startdate and v_end date
orend date not between v_startdate and v_end date
/
Tom
eg
1 select 'Y' from dual
2* where sysdate not between '10-APR-2000' and '15-APR-2000'
SQL> /
'
-
Y
SQL> edit
Wrote file afiedt.buf
1 select 'Y' from dual
2* where sysdate not between '10-APR-2000' and '15-APR-2001'
SQL> /
no rows selected
Arun Solleti <asolleti_at_csee.usf.edu> wrote in message
news:395A8C59.7DD01BB9_at_csee.usf.edu...
> Hi
>
> Can this be done ?
>
> I have table which will contain the reservation schedule of an equipment
> in a lab. The table will look like below:
>
> UserID EquipID EquipName StartDate EndDate
> xyz 123 Name1 06/28/00 10/28/00
> abc 123 Name2 11/28/00 12/28/00
> efg 123 Name3 05/06/01 12/04/02
>
>
> So different users depending upon there needs will reserve the
> equipment.
>
> If i want to search for the availability of EquipID:123, and specify a
> start date and end date. How should i parse through the above table, to
> give search results about its avilability(i.e. it is avilable from
> 10/28/00 - 11/28/00 and again avialable form 12/28/00 - 05/06/00 and not
> in-between)
>
> Thanks
> Arun
>
Received on Thu Jun 29 2000 - 00:00:00 CDT