>>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)
Thanks for the quick reply Mark. Unfortunately since we're using the IN clause the sub-select would have to be on one value only :(
George
Everything we see or seems
Is but a dream within a dream - Edgar Allen Poe