>>Or, I can use step 1 and SELECT from that cursor in step 2.
>
>Here's what I did.
>
>SELECT NOCLIENT,DATE FROM TABLE ORDER BY DATE INTO CURSOR TEMP
>
>SELECT * FROM TEMP GROUP BY NOCLIENT INTO CURSOR TEMP2
>
>First select to get all by ascending date. Then, on the 2nd select, the group will only the last occurence which will represent the last date.
>
>Thanks for your suggestions.
Essentially what you've done here is a 'nested' SELECT SQL statement. I don't know if VFP directly supports it, but I think some SQL RDBMSes do.
Though I may be beating a dead horse, isn't the ff. the same thing you're trying to do?
SELECT NOCLIENT, MAX(DATE) FROM TABLE GROUP BY NOCLIENT
alistair israel
Distressed DBA, Sleepy SysAd, Weary WebMaster (aka Senior Software Engineer)
aisrael@poboxes.com
Makati City, Philippines