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: select with between date/time

Re: select with between date/time

From: Sybrand Bakker <postbus_at_sybrandb.demon.nl>
Date: Fri, 24 Aug 2001 23:13:47 +0200
Message-ID: <todm6hs75168ef@news.demon.nl>

"Ralf Bender" <ralf.bender_at_nexgo.de> wrote in message news:20010824.21041019_at_mis.configured.host... hello

i want to write a select statement which tells me all rows between yesterday 07:00PM and today 04:00AM, BUT i don't know how. i want save this as pl/sql statement, which must run every day. so it doesn't help to write a fix time. I try with sysdate-1, but there's not my selected time range...
Can someone tell how to write such select?

thx
ralf

The unit of a date column is a day.
You need to specify 7:00:00 and 04:00:00 as fraction of the day and add that to sysdate.
As it is quite late, I leave the math as an exercise to you.

Hth,

Sybrand Bakker, Senior Oracle DBA Received on Fri Aug 24 2001 - 16:13:47 CDT

Original text of this message

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