Re: Informix SQL ver.2.10 Report Question (HELP)
Posted in 1994
In article <3577ei$902@emory.mathcs.emory.edu> johnl@informix.com (Jonathan Leffler) writes: >[...] > >ORDER BY u_hearing; > >You may end up having to use a temp table for the output to evade >problems with column naming in ORDER BY with UNION... Or, perhaps use ORDER BY #, where "#" is the ordinal number of the column "u_hearing". That means you have to count the columns correctly of course, and remember to check this SELECT statement if the layout of the table(s) ahead of u_hearing in the SELECT changes. :-( A better long-term approach might be to redesign the table in question to move the columns ba_hear{1,2,3,4} from the primary table to a detail table such that each ba_hearN resides in a separate detail row. This paricular application would still be a little tricky in that case. However, with the current design, you'll probably have similar problems whenever you want to consider the ba_hearN columns as a group. Just a thought, Walt. -- Walt Hultgren Internet: walt@rmy.emory.edu (IP 128.140.8.1) Emory University UUCP: {...,gatech,rutgers,uunet}!emory!rmy!walt 954 Gatewood Road, NE BITNET: walt@EMORY Atlanta, GA 30329 USA Voice: +1 404 727 0648