Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Help!Select latest date.
Try
select * from table where
trunc(date_field) = (select max(trunc(date_field)) from table);
Use the Trunc() function to avoid the time component section of the date field
Note: I haven't tried this code, but it should work...
"Prizant Lev A." <PrizantLA_at_BWSC.ORG> wrote:
>Hi,
>
>I'm trying to select a record or records from a recordset with the
>latest date.
>For example if there are 4 records with date fields:
>01-MAR-1999
>02-MAR-1999
>05-MAR-1999
>05-MAR-1999
>then I want to select all records where dates are '05-MAR-1999'.
>
>Thanks in advance!
>
To reply please remove the 'nospam' part of the address Received on Fri Mar 19 1999 - 09:47:47 CST
![]() |
![]() |