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

Home -> Community -> Usenet -> c.d.o.misc -> Re: Oracle and dates

Re: Oracle and dates

From: Niall Litchfield <n-litchfield_at_audit-commission.gov.uk>
Date: Wed, 7 Jan 2004 14:57:14 -0000
Message-ID: <3ffc1e4a$0$9387$ed9e5944@reading.news.pipex.net>


<rsj_at_gisportalen.dk> wrote in message
news:bcfec966.0401070629.4736501b_at_posting.google.com...
> Hi!
>
> I need some help with Oracle and dates! I have two tables in my Oracle
> database. I want to select the rows from the first table, that is 3 or
> more years older than any row in the second table. Can anyone help me?

Well

DATE1 - DATE2 will give the difference between 2 dates and min(datefield) will give you the date of the oldest record in a table, so you ought to be able to get your where clause fairly quickly from the above.

-- 
Niall Litchfield
Oracle DBA
Audit Commission UK
Received on Wed Jan 07 2004 - 08:57:14 CST

Original text of this message

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