Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
What is wrong with my use of reccount()?
Message
 
 
To
08/06/2005 15:05:52
General information
Forum:
Visual FoxPro
Category:
Other
Environment versions
Visual FoxPro:
VFP 8 SP1
Miscellaneous
Thread ID:
01021449
Message ID:
01021591
Views:
15
>>>
>>>It depends on the # of records returned by a query. A filtered cursor is a table opened similar to USE AGAIN and SET FILTER applied to it. With many records returned, SET FILTER will be faster becuse records don't have to be written to the result cursor.
>>
>>If I may ask you a follow up question, please.
>>
>>If I wanted to simply know how many records in a table matching some WHERE clause, and I want it as fast as possible (and then close the table), and I don't know how many records are in the resulting query (could be 1 or could be 1000 but probably not more than 1000), would your answer, "it depends" still apply?
>
>If you just want the number, you can either SELECT COUNT(*) where MyCondition if you're using non-buffered table and VFP version < than 9, you can use it also in VFP9 for buffered data if you put WITH BUFFERING into the SQL and you should use COUNT FOR ... if you're using VFP < than 9 and buffered data.

Yes, the SELECT COUNT(*) is what I ended up using. Thank you, Nadya.
"The creative process is nothing but a series of crises." Isaac Bashevis Singer
"My experience is that as soon as people are old enough to know better, they don't know anything at all." Oscar Wilde
"If a nation values anything more than freedom, it will lose its freedom; and the irony of it is that if it is comfort or money that it values more, it will lose that too." W.Somerset Maugham
Previous
Reply
Map
View

Click here to load this message in the networking platform