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: Max

Re: Max

From: Ethel Aardvark <bigjobbies_at_hotmail.com>
Date: 31 Jan 2003 07:11:42 -0800
Message-ID: <1a8fec49.0301310711.7a81ba11@posting.google.com>


select tx
from your_table
where date_field = select max(date_field) from your_table;

I hope teacher is happy! (He/She will like it even more if you suggest better column names than "tx" and "date"...

ETA Alain <Alain_at_o.fr> wrote in message news:<2003131-12409-671181_at_foorum.com>...
> Hello,
>
> I have :
>
> TX Date
> -- -----
> 3 2002-01-01
> 4 2002-05-01
> 5 2002-03-01
>
> I would like to get TX value where Date is the max date (4 in this sample)
> without using order by desc and selecting the first line...
>
> Thanks in advance.
Received on Fri Jan 31 2003 - 09:11:42 CST

Original text of this message

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