Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
What to use instead of _tally for SUM() SQL Select?
Message
From
29/11/2005 09:38:47
 
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Environment versions
Visual FoxPro:
VFP 9
Miscellaneous
Thread ID:
01072776
Message ID:
01072806
Views:
16
>>>The variable _tally indicates if SQL Select found any records. However, if the SQL Select has SUM() function _tally returns value of 1, even though there were no records matching WHERE.
>>>
>>>What do you recommend to use, instead of _tally, to check if SQL Select found records?
>>>
>>>Thank you.

>>
>>To begin with, your query results in a cursor or table or array, so if the resulting cursor, etc. is empty...
>
>Actually in the case of SUM()-present SQL Select, the resulting query has one record. So checking for empty cursor won't work.
>
>Thank you.



Right. My bad. Wasn't thinking about SUM().
Maybe I should not hurry to beat Sergey and Tore to the punch! <vbg>


Alex Feldstein, MCP, Microsoft MVP
VFP Tips: English - Spanish
Website - Blog - Photo Gallery


"Once again, we come to the Holiday Season, a deeply religious time that each of us observes, in his own way, by going to the mall of his choice." -- Dave Barry
Previous
Reply
Map
View

Click here to load this message in the networking platform