>>>I have a parent table P2 and two related child tables C1 and C2.
>>>Each table has in excess of 1 million records. After SETting
>>>the RELATIONs, how can I examine only those records in the
>>>children tables that should be constrained to the parent relationship?
>>>
>>>Based on the child related info, I will update a field in the
>>>parent table.
>>Create a form with 3 grids. Set recordsources as P2, C1 and C2. In C* set linkmaster, childorder, relationalexpression. You're done.
>>Cetin
>
>I do not want to use a gird or any type of interface. The relations
>have been set - no problem there. As I SCAN each parent record I want
>to examine just the results of the children records and based on that
>info update a field in the parent. For example, how do I know the
>total number of records in child table one (C1)? How can I run a
>query or a simple COUNT in the child that is constrained to the
>matching parent record? A simple SUM was going through ALL records
>in the child.
And this one uses another approach :
select parent
scan
select c1
sum while cKeyField = parent.KeyId to array cSum
select parent
...
endscan
Cetin