Data sorting in a Table

Data in Foxpro table is sorted by the order the data is entered. However, you can peridiocally re-sort the data according to the field that is meaningful to you by using the SORT TO command. For example,

SORT TO cust ON name

You can also soft the data to another new table. For example,

SORT TO cust2 ON name

This method will create a new table and soft the data from the original table to the new table. The data in the original table will remain untouched.

The SORT command will physically sort the data in the table. This SORT command is not a good approach to soft data for user viewing. If you have many users and every user want to see view the data in different sorting order, you cannot issues a soft command for each user. Anoter better approach to sort data for user viewing is by using Index.