Re: date/time field and its index
From: Michael Nolan <nolan_at_helios.unl.edu>
Date: 16 Sep 1994 23:59:37 GMT
Message-ID: <35dbh9$8bt_at_crcnis1.unl.edu>
Date: 16 Sep 1994 23:59:37 GMT
Message-ID: <35dbh9$8bt_at_crcnis1.unl.edu>
mcitron_at_hsc.usc.edu (Mark Citron) writes:
:I have a field which I am storing the date and time.
:How do I select all rows with today's date (ie disregard time)?
:If I do a to_date to strip out the time I loose the use of the index
:on the field.
This is what I've done, I _think_ it uses the index:
select x from foo where timestamp between '16-sep-94' and to_date('16-sep-94')+.9999;
--- Michael Nolan, Sysop for the DBMS RoundTable on GEnie nolan_at_notes.tssi.com, dbms_at_genie.geis.com (posted from nolan_at_helios.unl.edu)Received on Sat Sep 17 1994 - 01:59:37 CEST