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.
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