Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Select statement with count
Message
 
À
09/05/2003 13:00:15
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00786834
Message ID:
00786859
Vues:
22
Probably eval() here does not work as expected. Eric' and your example should work. Also this:
lccom="select count("+col1+") from chgnotce where not empty("+col1+")"
&lccom



>Yuri,
>
>For some reason eval() is not returning accurate results for me...it is returning all records as empty. I'm not sure why...
>
>Raj,
>
>
>select count(*) ;
>   from chgnotce where not empty(&col1)
>   into cursor lcSource
>
>
>Itt would probably be better to SET DELETED ON, instead of having to put NOT DELETED() in all of your queries.
>
>
>>Try this:
>>
>>select count(*) ;
>> from chgnotce where not empty(eval(col1)) and;
>> DELETED() = .F. into cursor lcSource
>>
>>>I am doing this:
>>>selectcount(col1) from chgnotce
>>>
>>>It is not working. could you please tell me what is the right way to use the col1 which is a variable in it i am getting the field name.
>>>
>>>*******************Start***********************
>>>for n = 1 to thisform.list1.listcount
>>> col1 = thisform.list1.listitem(n, 1)
>>> **col2 = thisform.list1.listitem(n,2)
>>> select count(col1) ;
>>> from chgnotce where not empty col1 and;
>>> DELETED() = .F. into cursor lcSource
>>>endfor
>>>***********************************************
>>>
>>>Thank you.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform