Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Change record order permanently
Message
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Environment versions
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Network:
Windows XP
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01192768
Message ID:
01192832
Views:
18
To do this you are going to copy to a new table. After copying to a new table you can delete the original and rename the new table to the original name.

There are various ways to copy to a new table with a specific sorted order..

1. Select * from (originaltablename) into table (newtablename) order by (sort expression)

2. Open the original table. Create or set index to appropriate order. Scan the table and copy records one-by-one to the new table.

3. use the SORT command.

Once this is done, the records in the new table will only be sorted properly until a new record is added.

you are much better off and more flexible using a structural index and setting the index tag when opening the table. This will ensure the index order is updated when records are added/deleted/modified.

>There is nothing more to that, the physical sort would not change.
>
>Yes, how to sort physical sort according to given index?
____________________________________

Don't Tread on Me

Overthrow the federal government NOW!
____________________________________
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform