Re: How to sort Detail records on Forms? (and other Q's)
Posted in 1995
> > > The specific problems I'm having are these: > > 1) How does informix return rows on unsorted queries? > On other databases I've worked on, you specify the primary key > for the table, and rows are returned in order by the primary > key field(s) when no ORDER BY is used. Leading to: Generally in the order they were written to the table. If you change a key to CLUSTER - that rewrites the index in the order of that field. I would imagine this to have the effect of making them come back in that order. > > 2) Does informix have a PRIMARY KEY designation that I haven't been > able to find in the manuals? Yes. Look into: ALTER TABLE ADD CONSTRAINT PRIMARY KEY > > 3) In a Master/Detail relationship on a screen form, how do you specify > the order of the rows to be returned in the detail records? > Try the above, otherwise I have no idea. > > 4) I have stumbled upon the COMPOSITES statement in the INSTRUCTIONS > statement in one of the forms inherited, and have been able to find > no mention of it in any of the books. Talking with someone else > about it, they mentioned that it is one of their 'undocumented > features' to perform joins on multiple-field keys. This seems like > something that would be fairly useful not to go undocumented. > Are there any more undoc'd features like this I should know about? Is documented in 2.1 (pp 3-64R). in 4.10 it says its on 7-47 - 7-50 under create index. I can't find it. The forms version of it hasn't changed since 2.1 and I keep a 2.1 manual around for just that reason - ace and sperform are much better documented therein. Holler with your fax number and I'll fax you the page on composites. Please also tell us what version of Informix you are using. cheers j. _____________________________________________________________________________ Jack Parker - Hewlett Packard, BSMC Boise, Idaho, USA jparker@hpbs3645.boi.hp.com _____________________________________________________________________________ "Character is what you are in the dark" - Emilio Lizardo _____________________________________________________________________________ Any opinions expressed herein are my own and not those of my employers. _____________________________________________________________________________