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

Home -> Community -> Usenet -> c.d.o.misc -> Re: sysdate

Re: sysdate

From: Marc Mazerolle <informaze_at_sympatico.ca>
Date: 1999/03/31
Message-ID: <37024C00.25B3EEED@sympatico.ca>#1/1

Why trunc sysdate at all in a between or in a <= condition ?

Jérôme Texier wrote:

> You don't need to join the dual table, and if you can, don't apply function
> on column because if the column is indexed, Oracle will not use the index,
> so :
> select abc
> from xyz
> where activitydate>=trunc(sysdate)
> and activitydate < (trunc(sysdate+1))
>
> Jerome. (jt_at_ystel.fr)
>
> Arjan van Bentem <avbentem_at_DONT-YOU-DAREdds.nl> a écrit dans le message :
> 7dtbpt$bp6$1_at_weber.a2000.nl...
> > Marc Mazerolle wrote
> > > where mytable.start_date between sysdate and sysdate + 7
> >
> > Ehhh, why search for a start date from now, until 7x24 hours from now?
> >
> > > > select abc
> > > > from xyz, dual
> > > > where activitydate = sysdate
> >
> > where trunc(activitydate) = trunc(sysdate)
> >
> > Arjan.
> >
> >
> >
Received on Wed Mar 31 1999 - 00:00:00 CST

Original text of this message

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