Subject | Re: Expressions/UDFs and Order By |
---|---|
Author | Kevin Morris |
Post date | 2002-10-31T02:57:58Z |
One more thing, Normally, I could just put the math expression
first and use "ORDER BY 1", however it's not an option in my case
because of the nature of the application.
K
first and use "ORDER BY 1", however it's not an option in my case
because of the nature of the application.
K
> Hello all,make
>
> I'm pretty sure I know the answer to my question, but I want to
> sure.expression)
>
> I have a SELECT statement as follows:
>
> SELECT col1, col2,...coln,BIN_OR(col4,324232)*(long math
> math_result ORDER BY math_result;Instead
>
> Now, as most of you probably know this query will fail because
> the 'math result' alias is illegal in the ORDER BY clause.
> one must, find its ordinal position in the column list and usethat
> in the ORDER BY clause.the
>
> For example,
>
> SELECT col1, col2,BIN_OR(col4,324232)*(long math expression)
> math_result ORDER BY 3
>
> I know this is no big deal, because one can easily keep track of
> position of the desired expression in the column list, but in myof
> case where the number of columns in the selects is constantly
> changing it's a pain. Is there a way to specify an alias instead
> an ordinal?
>
> If not, is there a forum in which I can appeal to the firebird
> developers to include this capability?
>
> Thanks,
> Kevin Morris