>Thanks for the reply.
>
>Unfortunately, this query returns more than one child record for the same parent.
If my query is correctly designed - which I am not entirely sure! - this would happen if there were two children with the same area. (Do you think this is the case?)
See if the following modification works:
select b_pk, max(b_area) from ChildTable;
group by b_pk;
into cursor Tmp
select Tmp.*, max(b.b_name);
from Tmp join ChildTable b on Tmp.b_pk = b.b_pk and Tmp.b_area = b.b_area;
group by Tmp.b_pk, b_area;
into cursor Tmp
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)