Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Date Search (fromdate TO todate)
Yes. I try to stay away from it just because people have a tendency to
reverse the order of the between and then they won't find what they are
looking for. I think the order should not matter given what between means
in natural language, but alas it does.
Jim
"Volker Neurath" <neanderix_at_gmx.de> wrote in message
news:9pnr2t$ju0nu$2_at_ID-29596.news.dfncis.de...
> Jim Kennedy wrote:
>
> >select ... from mytable where to_date('01/15/2001','mm/dd/yyyy')
> ><=theDateColumn and to_date('01/20/2001','mm/dd/yyyy') >=theDateColumn
>
> Much more Simple:
>
> SELECT...
> FROM table
> WHERE datefield BETWEEN to_date('01/15/2001','mm/dd/yyyy') AND
> to_date('01/20/2001','mm/dd/yyyy');
>
> With this you don't have to use >,<,<=,>= and you have to type the
> name of your datefield only one time, insted of typing it twice.
>
> Volker
Received on Sat Oct 06 2001 - 17:41:47 CDT