>Is it possible that by default a command like this will always return the highest date?
>
>SELECT * FROM table GROUP BY field ORDER BY date DESCENDING
I think it will just order the resulting query by date.
When grouping, VFP implementation of SQL seems to pick the last
physical record that match the grouping condition.
If you havent found other solution (of course different than
making a program for that), you might wanna try something like
this:
1) Create a cursor that have highest dates first for each
group of field1:
select * from Table1 order by field1,date1 desc into cursor xxx
2) Create an old unique index (ok i know this is a cheap trick :))
index on field1 to xxx unique
in cursor xxx you must have what you need.
HTH,
J. Luis
J. Luis Santiago Rodríguez.• CADIS • E-mail: jlsantiago@iserve.net.mx• Ciudad de México.