Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to count records in a child table ?
Message
From
10/03/2004 08:20:23
Mike Yearwood
Toronto, Ontario, Canada
 
 
To
09/03/2004 16:16:10
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00884570
Message ID:
00884787
Views:
21
This message has been marked as the solution to the initial question of the thread.
Hi Stephane

>Hello,
>
>I have 2 free tables. I establish a relation between them.
>But how to count records in the child table (result of the relation) ?
>

I think it is better to ...
LOCAL ARRAY laCount[1]
luMyCod = tableParent.myCod
SELECT COUNT(*) ;
  FROM TableChild ;
  WHERE tableChild.myCod = m.luMyCod INTO ARRAY laCount
?laCount[1]
This way the record pointer will not be moved in any workarea.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform