Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Determine Occurances Of Data Items
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00475329
Message ID:
00478207
Views:
24
>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
Previous
Reply
Map
View

Click here to load this message in the networking platform