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: PL/SQL

Re: PL/SQL

From: Paul Brewer <paul_at_paul.brewers.org.uk>
Date: Mon, 21 Jan 2002 19:48:45 -0000
Message-ID: <3c4c8b57_2@mk-nntp-1.news.uk.worldonline.com>


Try:
CURSOR c1 IS
  SELECT *
  FROM xyz
  WHERE datetime between trunc(sysdate)+6/24 and trunc(sysdate)+9/24;

"WK Yeoh" <cwy006_at_motorola.com> wrote in message news:a2gd82$1ci$1_at_newshost.mot.com...
> Hi,
>
> I have a PL/SQL statement like below:
>
> CURSOR c1 IS
> SELECT *
> FROM xyz
> WHERE datetime between to_date('20-01-02:06:00:00','dd-mm-rr
hh24:mi:ss')
> and to_date('20-01-02:09:00:00','dd-mm-rr hh24:mi:ss');
>
> Is there any way I can substitute the date '20-01-02' portion with
> everyday's date instead of hard code it. The time of '06:00:00' is fixed.
>
> Pls help,
> Wk
>
>
>
Received on Mon Jan 21 2002 - 13:48:45 CST

Original text of this message

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