Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
No. of records in _tally variable
Message
De
16/09/2013 05:10:10
Dragan Nedeljkovich (En ligne)
Now officially retired
Zrenjanin, Serbia
 
 
À
15/09/2013 23:50:31
Yim Ming Sun Derek
Spacious Design Consultant
Hong Kong, Hong Kong
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows Server 2008
Network:
Windows 2008 Server
Database:
Visual FoxPro
Application:
Desktop
Divers
Thread ID:
01583314
Message ID:
01583321
Vues:
65
>Hi,
>
>I use the _tally system variable, to check the number of records processed by the most recently executed table command.
>
>if I use the SET FILTER TO some condition and the result is 0 record, I find that _tally is not return 0 value.
>
>How to check the no. of records after the SET FILTER TO command ?

Set filter is not really doing anything, it is not a multiple record spanning command (like list, count, calculate, sum, report and a few others are) which affect the value of _tally. It's only setting a condition which will apply on next such command. So you can't know the number of records complying with your filter until one of those runs on all currently visible records. The simplest one is COUNT. Whichever command you use, you'll be at EOF(), though.

A simpler way may be a

select count(*) from myalias where {condition here} into array aTally

Then aTally[1] is the number of records, and you aren't at eof().

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform