Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to get the no. of records of a child table ?
Message
 
 
À
12/05/2009 23:38:35
Yim Ming Sun Derek
Spacious Design Consultant
Hong Kong, Hong Kong
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
Visual FoxPro
Application:
Desktop
Divers
Thread ID:
01399535
Message ID:
01399584
Vues:
49
>Hi,
>I have a form which is to maintain the Invoice records in one to many relation, invoice header table and the invoice detail.
>When I browse the Invoice header table, I want to know how many child records refer one invoice no.
>Is there any system variable or function to get the no. of child records ?
>
>Please advise.
>
>Derek Yim

It depends on what exactly you're using. If you're using tables directly than perhaps you can do
lnInvoiceID = Invoice.InvoiceID
select InvoiceDetails
count to lnInvDetails for InvoiceID = m.lnInvoiceID
Alternatively you can use select-SQL statement if you didn't make any changes to the tables yet.
If it's not broken, fix it until it is.


My Blog
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform