User-defined sorting in Ace
Posted in 1999
Topics: General Discussion
Using ACE in Informix 7.2, I'm trying to let the user define what sort order to use. I have four fields that they can use, but no restriction as to which order - it's being controlled by the shell script that will pass parameters to the report. For example, one run could be ORDER BY fielda, fieldb, fieldc, fieldd, the next run could be ORDER BY fieldc, fielda, fieldb, fieldd However, I don't seem to be able to get the report to compile if I include parameters in the ORDER BY clause. Am I wasting my time trying to resolve this, or is there some way (no matter how obscure) to achieve what I want. BTW, ACE has to be the dev tool to use. Sent via Deja.com http://www.deja.com/ Before you buy.
peter_raeburn@my-deja.com wrote: > > Using ACE in Informix 7.2, I'm trying to let the > user define what sort order to use. I have four > fields that they can use, but no restriction as > to which order - it's being controlled by the > shell script that will pass parameters to the > report. For example, one run could be ORDER BY > fielda, fieldb, fieldc, fieldd, the next run > could be ORDER BY fieldc, fielda, fieldb, fieldd > > However, I don't seem to be able to get the > report to compile if I include parameters in the > ORDER BY clause. Am I wasting my time trying to > resolve this, or is there some way (no matter how > obscure) to achieve what I want. BTW, ACE has to > be the dev tool to use. Have the shell script select from among the 24 possible reports each compiled with a different ORDER BY clause or have the script write and compile the ACE script on the fly (OK dumb idea but it'll work!). Truth is as soon as this report is in release someone will ask for the formatting of the a,b,c,d ordered report to differ from the c,d,a,b report. It never fails. This way you are ready and even have the infrastructure to support multiple formats for one sort order in place. Art S. Kagel