Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Count command
Message
 
 
À
07/05/2003 06:59:04
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Divers
Thread ID:
00785705
Message ID:
00786076
Vues:
27
>Hi Guys,
>
>I am trying to count the number of distinct records in a field.
>
>If I try the following:
>
>select count(DISTINCT P_no) from DATATMP
>
>This gives me a query Dcnt_p_no with the correct result.
>
>I dont want to be presented with the results of the query and
>just want to store this count to a variable.
>
>Is there any easier way of doing this?

You can store the count to an array:

select count(DISTINCT P_no) from DATATMP ;
INTO ARRAY aResults

Then look at aResults[1].
- I don't know why Microsoft does not add the ability to send the result
to a variable!
- Andy Rice
San Diego, CA
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform