Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Determine Occurances Of Data Items
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00475329
Message ID:
00478207
Vues:
23
>I have the following code:
>
>
>
>
>  select distinct tpi_ind;
>    from cdmtpi;
>    order bytpi_ind;
>    into array aindicators
>


And the question is? Do you want to know how many distinct values exist?

select count(distinct tpi_ind)...

Do you want to know how many of each tpi_ind you have?

select tpi_ind, count(*) kount from cdmtpi group by tpi_ind order by tpi_ind ...

If you want only those tpi_ind with a count greater than some value:

select tpi_ind, count(*) kount from cdmtpi group by tpi_ind having kount > 6 order by tpi_ind ...
Mark McCasland
Midlothian, TX USA
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform