Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Count for AND deleted records
Message
De
26/05/2006 13:37:04
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Count for AND deleted records
Divers
Thread ID:
01125349
Message ID:
01125349
Vues:
56
I have a rather simple program which is designed to "count" records for statistical analysis. I came across a weird situation.

1. Set your deleted records so that you can see them.
2. Count the number of records using a filter that would exclude the deleted record.
3. You should find that your count includes the deleted record anyway.

In my situation, I had survey data which captures the age of the participant. I also had one deleted record in the table.

The first count returns the correct number of records: 24 (This is ALL of the responses.)
The second count returns an incorrect number of records: 1 (s/b 0)

If I had 100 facilities, then the total of m.response_0 would be overstated by 100.
* Deleted record facility = 'ABC'
* The second count will include the deleted 'ABC' record.

COUNT FOR q61 > 0 AND NOT ('88' $ STR(q61) OR '99' $ STR(q61)) ;
	AND facility = 'XYZ' TO m.responses
COUNT FOR q61 = 0 OR ('88' $ STR(q61) OR '99' $ STR(q61)) ;
	AND facility = 'XYZ' TO m.no_response
Gordon de Rouyan
DC&G Consulting
Edmonton, Alberta
Email: derouyag@shaw.ca
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform