Link to home
Start Free TrialLog in
Avatar of formadmirer
formadmirerFlag for United States of America

asked on

VFP 9 Select Top 10

Hi all.

It's been quite a while since I did any work in FP.

I have a table with "productid" and "prodcount". They are both numeric. Prodcount contains inventory counts.

What I need is to select the ten product ids with the largest counts.

The table is not indexed on the prodcount field and I cannot change that.

Thanks!
ASKER CERTIFIED SOLUTION
Avatar of Pavel Celba
Pavel Celba
Flag of Czechia image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Besides, you can always index a table temporary, just use the INDEX command to create an IDX or a tag of a CDX and specify the destination file, this will not change the table and so won't hurt any system. Besides it would be a seldom side effect for a table to stop working with an additional index tag.

Bye, Olaf.
Avatar of formadmirer

ASKER

Thank you. Simple, direct and it worked.