>I don't understand if you use Sql Server or VFP (Sql server not suport into table and VFP not support Var=SubQuery, i check it with VFP 6)
>
>If this is with VFP, the first sql must work, simply add the adrres&max date fields in Order and group by. Is a basic rule of groupping... Only adding the adrees never work
Mario,
Sorry couldn't understand exactly what you mean.
In VFP you CAN DO :
var = subquery
But it's not always as painless as it does in SQL server.
It does work with only returning a field that you want or any one of them. You do the group by in subquery not main OR better yet don't do any group by. ie:
select * from myTable t1 ;
where myDate = (select max(mydate) from myTable2 ;
where t1.PK = t2.PK)
You might check a better sample on foxyclasses site (tips page).
Cetin
Cetin