Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
What to use instead of _tally for SUM() SQL Select?
Message
De
29/11/2005 09:38:47
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Versions des environnements
Visual FoxPro:
VFP 9
Divers
Thread ID:
01072776
Message ID:
01072806
Vues:
17
>>>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
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform