Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Count for AND deleted records
Message
From
26/05/2006 13:37:04
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Count for AND deleted records
Miscellaneous
Thread ID:
01125349
Message ID:
01125349
Views:
51
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
Next
Reply
Map
View

Click here to load this message in the networking platform