[VFP application] Method for sorting data in a certain field in DBF table

xiaoxiao2021-03-05  32

(Http://community.9cbs.net/expert/topic/3807/3807056.xml?temp =.8270075)

Ask, how to put the records in the table from the sequence field from small to a large arrangement. For example, the original record is 1, 1, 2, 3, 4, 1, 2, 1 arrangement is 1, 1, 1, 2, 2, 3, 4

-------------------------------- 1, INDEX ON To sort the word name to SY2, SELECT * from your table name Order by 2 && 2 means that the field you want to sort is the second field in the table (this doesn't generate a new table, the database is turned back after the VFP is closed, just establish an index file,) ---------------------------------- ---------------------------------------------------------------------------------------------------------------------------------------

The simplest sort is also

Sort To New Table ON To Sort Field Name (This will generate a new table, the new table name is: new table, "new table" is in order from small to large order in order to "to sort word name"

Sort to Function: Physical Sorting Syncure: Sort To ON [For ]

转载请注明原文地址:https://www.9cbs.com/read-33773.html

New Post(0)