Re: How to sort Detail records on Forms? (and other Q's)
Posted in 1995
In article <3qvbak$i8e@access5.digex.net> briang@access5.digex.net "Brian G." writes: > 1) How does informix return rows on unsorted queries? Depends on how it gets hold of the rows. If it's 'SELECT * FROM tabname' then in ROWID sequence (e.g. physical order), but if the statement has complicated WHERE clauses and/or JOINS, this may influence the results. > 2) Does informix have a PRIMARY KEY designation that I haven't been > able to find in the manuals? You may be thinking of ROWID, which exists pre-version 7. However, the basic idea is that you design a database which is (more-or-less) third normal form, and each table has a clear UNIQUE index which you build. I'm deeply suspicious of database designs where tables don't have at least one UNIQUE index. > 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? There is no specific way of doing this, but I suspect that the composite (see below, which should refer to the primary parts of the UNIQUE index on the DETAIL table) plays a big part in dealing with this. I would have to spend time I don't have investigating to be definative. Maybe someone at Informix can be? Does you detail table have an index on filenum, rentfilenum? > 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. I'm sure it's not undocumented. In fact, it's in the INSTRUCTIONS section on page (damn - no page numbers!) of my SQL Quick Reference Guide, which happens to be for release 4.1. It's also in the same guide for release 2.1, so I think you either have an 'out of the ark' version or are missing some manuals or havn't done enough RTFM! -- ============================================================================ Sally Woolrich | This mail contains my personal sally@excelsis.demon.co.uk | views not those of my employer! ============================================================================