Hi,
I have two tables:
table1 (attr1 text, attr2 int4)
table2 (attr1 text, attr3 int4, attr4 bool)
I have a query:
SELECT table1.attr1 AS ALIAS, attr2 from table1 UNION ALL SELECT table2.attr1, attr3 from table2 ORDER BY ALIAS;
I that syntax all is OK.
I want to have a result from ORDER BY length(ALIAS), but this is imposible.
When ORDER BY clause is in format ORDER BY length(attr1), the result is not
ORDERED BY length of attr1.
What can I do? Are anybody have an idea?
Vladimir