Inconsequences in SELECT/ORDER BY
Posted in 1994
Hello Informixers!
I had a little problem with an ORDER BY clause:
First of all I use the possibility to SELECT a column more than once
in a SELECT-statement:
SELECT col_a, col_b, col_a FROM tab;
This works fine and makes life easier for me (really!).
Now I tried: SELECT col_a, col_b, col_a FROM tab ORDER BY col_a;
I received the "ambiguous column" - error. I think that in this context
this error should NOT be reported.
O.K. the workaround is quite easy using "display labels".
( SELECT col_a ca1, col_b, col_a ca2 FROM tab ORDER BY ca1; )
What is the opinion of the net? Is the error reporting correct or not?
Achim
--
==========================================================================
/ Achim Reiners Software Engineering \\
| /M/A/I Deutschland GmbH |
| Softwarezentrum Koeln Phone: +49 221 956400-40 |
| Mathias-Brueggen-Str. 85 Fax: +49 221 956400-69 |
\\ 50829 Koeln E-Mail: ar@mai.de /
\\_________________________________________________________________________/