Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Tricky SQL Problem
This surely 'll do the trick:
Select T2.id_column
, T2.date_column , T2.additional_column1 , T2.additional_columnN from (Select id_column, max(date_column) date_column from TABLE group by id) T1 , TABLE T2 where T2.id_column=T1.id_column and T2.date_column=T1.date_column
--
> _____________________________________________
> VX8000 B.V.
> Business IT
>
> Ir N.R. van den Berg
> E-mail: mailto:rvdberg_at_vx8000.com
> Web : http://www.vx8000.com
> _____________________________________________
>
Matt Randle wrote in message
<925474592.23218.0.nnrp-07.d4e48d0d_at_news.demon.co.uk>...
>The query works but I can't get it to return additional columns. If I try
>to include the names of the additional columns in the select clause the
>group by statement won't work.
>
>Thanks,
>
>Matt.
>
>
>
>
Received on Thu May 06 1999 - 06:37:24 CDT