Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Count for AND deleted records
Message
 
To
26/05/2006 13:37:04
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
01125349
Message ID:
01125350
Views:
16
Not quite clear how do you do your #2, "Count the number of records using a filter that would exclude the deleted record."

Do you use "for NOT deleted()" filter?



>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
>
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform