Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: select with between date/time
"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
![]() |
![]() |