Please note that it is not "Order by" in SQL statement.
I just want to sort the records when I open up my table to browse I am a clever newbie...
HI
You can create a view for this purpose and index the view on the fly with CDX type as per the requirement/needs.
Probably in the click event of the header in the Browse Grid, you can create the index as needed on the view.
When the view is closed, the index gets deleted. This way the index does not bloat the data table. The down side is the indexing activity. SO, if the tables are not very large, indexing can be done on the view. If it is very large, then do it on the main table. Also, think that if the view opens up only small amount of data at a time, then this is handy irresptive of large or small table.
HOpe this idea helps you
However, if you are loading the records in a memory array, then you can sort by using ASORT command.
actually i want to sort the records because I want to do some edit and paste. By sorting some thing fields, it makes copying and pasting easier for me... I am a clever newbie...
Have you looked at the SORT Command? The only "problem" is that you need to open the table exclusive and it can require as much as 2.5 times the size of your table in free space on disk. (It's also "slow" compared to indexing!)
the best way to get certain records in the order you want that is only a temporary condiction is to use the SQL select. using WHERE (other choices are joins, order by) Attitude is Everything
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.