Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> Re: SQL help

Re: SQL help

From: rjamya <rjamya_at_gmail.com>
Date: Fri, 21 Oct 2005 15:11:19 -0400
Message-ID: <9177895d0510211211k465c53d3j58e74799fd879bf9@mail.gmail.com>


select *
from my_table
where audit_timestamp between (specified_time-(1/144)) and (specified_time-+1/144))
/

On 10/21/05, ora_forum <ora_forum_at_yahoo.com> wrote:
>
> Hi All,
>
> I need find data, which are meet criteria 10 minutes before and 10 minutes
> after specific time. This is what I have and it's not working properly
> with between function:
>
> select id_number from test where status = 'X' and id_number in
>
> (select id_number from test where to_date(to_char (changed_on,'MM/DD/YYYY
> HH24:MI'),'MM/DD/YYYY HH24:MI') in
>
> select to_char (audit_timestamp,'MM/DD/YYYY HH24:MI') from result_table
>
> where to_date(to_char (audit_timestamp,'MM/DD/YYYY HH24:MI'),'MM/DD/YYYY
> HH24:MI')
>
> between
>
> to_date(to_char (audit_timestamp - 1/288,'MM/DD/YYYY HH24:MI'),'MM/DD/YYYY
> HH24:MI')
>
> and
>
> to_date(to_char (audit_timestamp + 1/288,'MM/DD/YYYY HH24:MI'),'MM/DD/YYYY
> HH24:MI');
>
> Thanks.
>
> ------------------------------
> Yahoo! FareChase - Search multiple travel sites in one click.<http://us.lrd.yahoo.com/_ylc=X3oDMTFqODRtdXQ4BF9TAzMyOTc1MDIEX3MDOTY2ODgxNjkEcG9zAzEEc2VjA21haWwtZm9vdGVyBHNsawNmYw--/SIG=110oav78o/**http%3a//farechase.yahoo.com/>
>
>

--
------------------------------
select standard_disclaimer from company_requirements where category =
'MANDATORY';
--
http://www.freelists.org/webpage/oracle-l
Received on Fri Oct 21 2005 - 14:38:53 CDT

Original text of this message

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