Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Multiple fields for Sort ??
Message
From
14/07/2003 16:04:22
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivia
 
 
To
14/07/2003 14:25:00
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00809938
Message ID:
00809984
Views:
27
Depending on the purpose, you can use SELECT - SQL, or an index.

For instance, if you need this for a report, you can use:
select * from dd_cand;
  order by lname, job, salary;
  into cursor temp
report form...
For an index (temporary or permanent) to show data sorted in a grid, for instance, you simply concatenate the fields, converting different data types to character:
index on lName, job, str(salary, 12, 2) tag MyOrder
>How do I use multiple fields for sort.
>
>For example I have table dd_cand with fields lname, job, salary, etc.
>
>I want to sort 1st by lname, 2nd by job, and 3rd by salary (see
>example list below):
>
>Anderson Programmmer 20,000
>Anderson Programmer 35,000
>Bates Accountant 50,000
>Bates Notary 35,000
>Michaels Engineer 50,000
>Michaels Engineering Mgr 50,000
>...
>...
>...
>
>Thanks,
>
>F.Z. Boston, MA
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform