>Is there another way to index a table with
>using INDEX ON my_fld TO inx_name?
>
>I want to ORDER BY a group of records
>that are contained in a filter using SET FILTER TO something.
>I do not want to use INDEX TO or the SELECT statement.
>Any ideas?
You have a bunch of options:
(1) You can add a FOR clause to an index to filter the set of records available when that index is active. While the index can't be used for Rushmore optimization, it does provide the fastest sorted, filtered access to a table on a record by record basis without using a SQL Select to extract a cursor. Since the index only contains the records meeting the conditions of the FOR clause, you don't have the horrid performance hit moving from one filtered record to the next for a non-optimizable filter condition. Filtered indexes can be either standalone .IDX files or tags in a .CDX file.
(2) You can extract a set of records using the SORT verb, with the same type of FOR statement. SORT will respect any filters set on the file at the moment. I see no advantage to this over a SQL Select, but whatever trips your trigger...
(3) You can use a parameterized view to access the filtered subset of records; once you're using a parameterized view, you can index the view if necessary. If you set up the view properly, you can make changes to the view and update the table from the view.