Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Filtering count without cursor
Message
From
05/02/2009 10:01:00
 
 
To
05/02/2009 09:28:08
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
01379421
Message ID:
01379476
Views:
23
It's ugly code and doesn't address your original requirement to count only distinct values.

>Excellent!
>Can you take a look on the following?
>
ccount=getfiltercount("mytable", "between(id,521548,529785)")
>thisform.txt1.value=ccount
>
>function getfiltercount(tctable, tcfiltercondition)
>	local lnselect, lncount
>	lnselect = select() && Save current work alias!
>	select 0
>	use (tctable) again
>	count for &tcfiltercondition
>	lncount = _tally
>	use
>	select(lnselect)
>	return (transform(lncount))
>endfunc
>
>
>
--sb--
Previous
Reply
Map
View

Click here to load this message in the networking platform