I think, we have to test this statement. It seems right logically, but not necessary might be true...
BTW, as I understood, we have related tables...
I'll run some tests later tonight...
>The COUNT() example will be faster (assuming there is an appropriate index) to first SEEK() and then do a COUNT WHILE instead of FOR. As I recall the FOR condition will read all the records in the table - the WHILE will only read until the condition is no longer true - less records to read.
>
>>>I have two tables related together and want to be able to count the number of associated child records whenever I move the pointer in the parent table.
>>>
>>>How do I do this?
>>>
>>>Thanks!
>>
>>Use either Select SQL (if tables unbuffered) or count, e.g.
>>
>>select child
>>lnRecno=recno()
>>count for ChildID = m.lnParentID to lnChildren
>>go to lnRecno
>>select Parent
If it's not broken, fix it until it is.
My Blog