>I have a SQL that extract a specific set of datas from a table. One of my field extracted can occur more than once. I would like my SQL to only extract unique occuring of that field. So, this bring us to SELECT * FROM table GROUP BY field1.
>
>But, I would like to be able to only keep the occurence of field1 which contain the highest date. Is there a syntax that will allow me to do something like this: SELECT * FROM table GROUP BY 1 ORDER BY date DESCENDING KEEP THE HIGHEST ONE.
>
>I think you got the point. :)
>
>Any idea?
Hi, I haven't read all the answers yet, so maybe this idea has been posted, anyway, this works:
Select Distinct(cCol1), CToD(Right(Max(cCol1+DToc(dCol2)),8)) As dCol3
From table1
Group By cCol1
HTH,
Alex.
Alexandre Nobre
Alpha Bytes Computer Corp.
Did you know that there are innocent people dying in East Timor?
It helps if you do...
I suppose you don't need glasses if you're able to read this line