Subject | expressions in "order by" clause |
---|---|
Author | Anton Malinovskiy |
Post date | 2005-03-16T09:33:36Z |
Hello everybody
Firebird SQL allows to use expressions in order by clause, but I haven't
managed to make it sort by the column number which is a result of
expression.
For example:
select id, name
from my_table
order by (1 + 1)
this statement will return an unsorted set of results and
select id, name
from my_table
order by (2)
the result set will be sorted by "name" value.
Is it possible to make Firebird sort by the column number which is a result
of expression?
Best regards,
Anton Malinovskiy
[Non-text portions of this message have been removed]
Firebird SQL allows to use expressions in order by clause, but I haven't
managed to make it sort by the column number which is a result of
expression.
For example:
select id, name
from my_table
order by (1 + 1)
this statement will return an unsorted set of results and
select id, name
from my_table
order by (2)
the result set will be sorted by "name" value.
Is it possible to make Firebird sort by the column number which is a result
of expression?
Best regards,
Anton Malinovskiy
[Non-text portions of this message have been removed]