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: 2) Does informix have a PRIMARY KEY designation that I haven't been able to find in the manuals? 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? I am trying to join this: Master=leases.filenum (Ordered by filenum, the lease number) Detail=rents.rentfilenum (Ordered by rentmonth, the payment being made) When selecting detail, I want the rents.* records to be sorted by rents.rentmonth, instead of just coming up in whatever order they happen to physically be in the database. I have not been able to find any mention of how to sort rows when dealing with screen forms in any of the manuals (which I find rather difficult to use, as whenever you start to learn about a topic, it then tells you to go somewhere else to read about how to use it, and the indexes are rather lacking in robustness). If you could do ORDER BY on views, I could kludge this up, but as of now I am at a loss. I am perfectly willing to admit that I am an idiot and have missed this information the twenty times or so I've tried to find it in the manuals I have here (SQL User's Guide, SQL Reference Guide) and would be eternally grateful if you could hep be out with this. 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? Thank you for you time and patience, - Brian G. -- Ready to pull out my hair and start on someone else's.