Author: Michael Savage
Posted: 2012-04-13 17:34:55 Link
After setting a filter, how do I determine the number of records that
meet the condition
I have a table that has 60 records. I have a field called active which
is logical
If let say 45 records are true, and I set the filter to active=.t. How
do I know how many records would be available (45 in this example)
"My mind is going, I can feel it" "Would you like to hear a song..."
"Yes Hal"
Mike
_______________________________________________
Post Messages to: ProFox@leafe.com
Subscription Maintenance: http://leafe.com/mailman/listinfo/profox
OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: http://leafe.com/archives/byMID/profox/4F88AA0F.7010908@golden.net
** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious.
Author: M Jarvis
Posted: 2012-04-13 17:39:27 Link
On Fri, Apr 13, 2012 at 3:34 PM, Michael Savage <msavage@golden.net> wrote:
> After setting a filter, how do I determine the number of records that
> meet the condition
> I have a table that has 60 records. I have a field called active which
> is logical
> If let say 45 records are true, and I set the filter to active=.t. How
> do I know how many records would be available (45 in this example)
count to lnFilteredRecordCount
or
count
lnFilteredRecordCount = _TALLY
or
SELECT COUNT(*) as lnFilteredRecordCount from MyTable where active = .t.
or
...
--
Matt Jarvis
Eugene, Oregon USA
_______________________________________________
Post Messages to: ProFox@leafe.com
Subscription Maintenance: http://leafe.com/mailman/listinfo/profox
OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: http://leafe.com/archives/byMID/profox/CAPT54rbPAty2b_bTqR+LyQ06ZjaF4dczh6UHKLcgU_WHxRL4=g@mail.gmail.com
** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious.
Author: Sytze de Boer
Posted: 2012-04-13 17:46:56 Link
I know you'll think I'm being a smartass
count to lcA for active
On Sat, Apr 14, 2012 at 10:34 AM, Michael Savage <msavage@golden.net> wrote:
> After setting a filter, how do I determine the number of records that
> meet the condition
> I have a table that has 60 records. I have a field called active which
> is logical
> If let say 45 records are true, and I set the filter to active=.t. How
> do I know how many records would be available (45 in this example)
>
> "My mind is going, I can feel it" "Would you like to hear a song..."
> "Yes Hal"
>
> Mike
>
[excessive quoting removed by server]
_______________________________________________
Post Messages to: ProFox@leafe.com
Subscription Maintenance: http://leafe.com/mailman/listinfo/profox
OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: http://leafe.com/archives/byMID/profox/CAG1nNy_875hb1gofgLGqSQL8jcHjXhEScT35UrQ59x5tRL1u4g@mail.gmail.com
** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious.
Author: Joel N. Fischoff
Posted: 2012-04-13 17:54:57 Link
>If let say 45 records are true, and I set the filter to active=.t. How
>do I know how many records would be available (45 in this example)
Matt already gave you two methods (using COUNT TO and _tally), but it
always makes me twitchy to do an aggregate function on a database and only
look for one item. So you may also want to look at the CALCULATE command.
CALCULATE can run a set of calculatons, including counts, average,
maximums, minimums, net present values, standard deviations, sums, and
variances. Maybe more too, but that's all that comes to mind off the top
of my head.
Joel
_______________________________________________
Post Messages to: ProFox@leafe.com
Subscription Maintenance: http://leafe.com/mailman/listinfo/profox
OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: http://leafe.com/archives/byMID/profox/14266C50D0C5496D92D991D5DA6E30BB@ASUS1
** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious.