>>>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>
"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