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: Returning The Closest Single Value

Re: Returning The Closest Single Value

From: Niall Litchfield <n-litchfield_at_audit-commission.gov.uk>
Date: Thu, 17 Oct 2002 09:25:31 +0100
Message-ID: <3dae73fb$0$8507$ed9e5944@reading.news.pipex.net>


"Barry Warner" <bwarner_at_blueyonder.co.uk> wrote in message news:K3ur9.29254$jR.14136_at_news-binary.blueyonder.co.uk...
> Hi
>
> I need to compare the system date with the first available date in
> workshop_start_date column. How do I only return the closest date?

select min(abs(sysdate-workshop_start_date)) from .... where....;

HTH

--
Niall Litchfield
Oracle DBA
Audit Commission UK
*****************************************
Please include version and platform
and SQL where applicable
It makes life easier and increases the
likelihood of a good answer

******************************************
Received on Thu Oct 17 2002 - 03:25:31 CDT

Original text of this message

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