Hi,
Table A is parent-> child with table B
A has PKey and MyName fields
Table B has a PKey, FKey (to A) and MyDate fields
in VFP I can do
select A.pkey, B.Pkey, max(MyDate) from a join b on b.fkey = a.pkey group by a.pkey
and get the record in B with the latest date.
in SQL Server, however, I must group on both A.PKey, and B.Pkey - so question - how can I get from SQL Server a result set like
A.Pkey B.Pkey
where the second field is the key of the record related to A with the latest date?
TIA,
Ken B. Matson
GCom2 Solutions