Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: problems with picking up the latest record..
"Deepu" wrote:
> Hi,
> I have a table in my database which has a date column...I need
> to pick up a resultset based on a where clause, identify the
> latest record based on the date column and then go ahead and
> pick up other values of the latest record. Here is the rough
> structure of the query..How could we use max with a date??..or
> could we do an order by...desc and pick up the first
> record??..Please help..
>
> select bill_nbr from bill_table
> where (bill_date is the most recent.)
>
> Thanks in Advance.
> Deepu.
> [color=blue:f44f5a1408][/color:f44f5a1408]
HI,
Got the answer by myself..
select bill_nbr from (select bill_nbr from bill_table order by update_date desc) temp where rownum < 2.
do write in your replies too...
Thanks a lot,
Deepu.
Received on Tue Sep 13 2005 - 11:44:08 CDT
![]() |
![]() |