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: Date and DateTime columns

Re: Date and DateTime columns

From: Jim Kennedy <kennedy-family_at_attbi.com>
Date: Wed, 09 Jan 2002 14:23:59 GMT
Message-ID: <3oY_7.13654$DG5.123049@rwcrnsc53.ops.asp.att.net>


Actually if you create a function based index (trunc(myDate) then Oracle will use the index. If you don't want time to matter then you could have a trigger in the backend to truncate the date upon insert or update. That way you eliminate worrying about it being in your front end or someone else's front end.
Jim
"Dag Arne Matre" <dag-arne_at_matreweb.com.antispam> wrote in message news:r_U_7.24243$KQ3.446094_at_news1.oke.nextra.no...
>
> > trunc(date_column) = ...
> >
> > or specify a BETWEEN clause with time fraction 00:00:00 and 23:59:59
> > (not having to specify this in every SQL-statement is probably what
> > Dag Arne means by 'cleaner SQL') .
> >
>
> That is a perfect example of what I mean. Then add aggregate functions,
> group by, ...
> Another factor for us is portability between dbms platforms.
> "where xxx_dt = :my_date" works on all platforms, while the other examples
> Jaap mentions might have to be written differently for each dbms platform.
>
> D A
>
>
Received on Wed Jan 09 2002 - 08:23:59 CST

Original text of this message

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