Consultor Eletrônico



Kbase P7728: How to find the number of records in Progress database table
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   3/11/2003
Status: Unverified

GOAL:

How to find the number of records in Progress database tables?

FIX:

1. To get the number of records for one table, use SQL-89 / SQL-92 code like:

SELECT COUNT(*) FROM tablename.

or use 4GL code like:

DEFINE VARIABLE iNumRecords AS INTEGER NO-UNDO.
FOR EACH TableName NO-LOCK:
iNumRecords = iNumRecords + 1.
END.
MESSAGE iNumRecords
VIEW-AS ALERT-BOX INFO BUTTONS OK.

2. To get the number of records for all tables, use the Progress PRTOUTIL utility with the tabanalys qualifier:

PROUTIL DatabaseName -C tabanalys

or with the dbanalys qualifier:

PROUTIL DatabaseName -C dbanalys