>Update TableB set FieldTotal = (select TableA.FieldTotal from TableA where TableA.FieldPersonName + DTOS(SomeDate) in (select FieldPersonName + DTOS(SomeDate) from TableB))
I added an Update at the bottom of my reply. I mainly work with Oracle as my database and the SQL above works there. Unfortunately, VFP does not support that kind of sub-query.
>select TableA
>set order to NameDate && index tag on FieldPersonName + DTOS(SomeDate)
>select TableB
>set relation to FieldPersonName + DTOS(SomeDate) into TableA
>replace all FieldTotal with iif(eof('TableA'), 0, TableA.FieldTotal)
The code above should work.
Mark McCasland
Midlothian, TX USA