>I have a table with say 3 fields--ID, Description, EffectDate. On many records the ID and Description can be the same. The only thing differentiating them is the EffectDate. Out of these duplicates I want only the record with the most recent EffectDate. Is there a way to do this with a SELECT query or am I going to have to loop through a cursor in order to get these results?
>
>TIA,
>George
See if this works:
select fieldlist from mytable where id in (select id, max(effectdate) from mytable group by id)
Mark McCasland
Midlothian, TX USA