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: Easy SQL Question?

Re: Easy SQL Question?

From: Jens Loebling <Jens.Loebling_at_usa.net>
Date: 14 Nov 2001 07:50:17 -0800
Message-ID: <69746db6.0111140750.5678ae19@posting.google.com>


carolek_at_ix.netcom.com (Carole Kaufman) wrote in message news:<72330e0d.0111132002.7d50c638_at_posting.google.com>...
> I want to pull records for the past 4.5 hours, based on the time the
> query runs. I know that if I want records for the past 24 hours, I
> say:
>
> Last_Update_Tstamp>= (sysdate-1)
>
> This runs fast; I'm happy. BUT, how do I get the past 4.5 hours? In
> DB2 I'd add 'hours' after 4.5, but this is Oracle. So I tried
>
> Last_Update_Tstamp>=(Sysdate - 0.19).
>
> This runs slowly if at all...so it must be wrong.
>
> What is the right way?

Hallo Carole,
please try: Last_Update_Tstamp>= (sysdate-4.5/24) Best Regards
Jens Loebling Received on Wed Nov 14 2001 - 09:50:17 CST

Original text of this message

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