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: problems with picking up the latest record..

Re: problems with picking up the latest record..

From: Deepu <DoNotEmail_at_dbForumz.com>
Date: 13 Sep 2005 12:44:08 -0400
Message-ID: <4_881262_1f45258f69ffbdabc8e3d0c4e049b3ee@dbforumz.com>


"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

Original text of this message

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