Re: Changing retrieval order on ISQL forms
Posted in 1992
> The rows in the table occurred in some order, but it wasn't lexically > sorted by default. > > One way to achieve sortedness is to specify a *clustered* index for > the table. This will sort the rows in the same order as the specified > index. Then, when fetching rows, they will be lexically sorted based > on the index. > > I hope this helps newcomers (I'm still one :-) ). > Unfortunately this solution is only of help with a very static table. Clustered indexes in Informix work by sorting the table into the order of the index when you create the index. Any further entries in the table are placed wherever there is space - Normally at the end of the table unless deletes are also occurring. This means that at soon as any inserts to the table occur the form will no longer retrieve in index order. To recreate the ordering the clustered index must be dropped and recreated. At this time there is no known method of requesting an ISQL form to retrieve the data in a particular order. But if the Select statement it generates from a QBE entry ends up using a particular index to help produce the results then the rows returned will normally be in the order of the index. Hope this helps Cheers - Jim -------------------------------------------------------------------- Name: Jim Gordon Internet: jgordon@ssf-sys.DHL.COM Company: DHL Systems Inc Phone: (415) 358-5911 (Work) Address: 1700 S. Amphlett Blvd. (415) 882-9728 (Home) San Mateo, CA 94402 Fax: (415) 571-6429 --------------------------------------------------------------------