_TALLY System Variable

Contains the number of records processed by the most recently executed table command.

_TALLY = nRecords

Parameters

  • nRecords
    Contains a numeric value indicating the number of records processed by the most recently executed table command.

Remarks

Certain table processing commands return information about their status ("talk") while they execute. When such a command finishes executing, it displays the number of records it processed (if SET TALK is ON), and stores this number to the _TALLY system variable.

The following commands return status information:

APPEND FROM AVERAGE
CALCULATE COPY To
COUNT DELETE
INDEX PACK
REINDEX REPLACE
REQUERY SELECT - SQL
SORT SUM
TOTAL UPDATE

When you start Visual FoxPro, _TALLY is set to 0. Executing one of the commands above replaces the _TALLY value with the number of records the command processed.

Example

This example uses SELECT to return the number of customers in the USA. The result is automatically stored to _TALLY. The _TALLY value is displayed.

SELECT * FROM customer ;
   WHERE country = 'USA' ;
   INTO CURSOR temp
? _TALLY

See Also

SET ODOMETER | SET TALK | SELECT