Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
SET RELATION
Message
De
25/08/1998 11:22:35
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
 
 
À
25/08/1998 11:07:52
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Divers
Thread ID:
00129719
Message ID:
00129726
Vues:
20
>>>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 :
*Relations set
select parent
scan
 select c1
 sum while cKeyField = parent.KeyId to array cSum
 select parent
 ...
endscan
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform