Re: How to identify a column in order by clause
From: doichi <doichinka_at_abv.bg>
Date: 7 Jan 2005 15:51:12 -0800
Message-ID: <1105141872.244778.219040_at_c13g2000cwb.googlegroups.com>
Date: 7 Jan 2005 15:51:12 -0800
Message-ID: <1105141872.244778.219040_at_c13g2000cwb.googlegroups.com>
Mr. Morgan,
ENAME SAL
10x for your long dump... without Oracle near at hand, I missmatched
the case with table aliases (if table alias present, you must use it
instead of table name to reference cols in ORDER BY clause, otherwise
Oracle complains):
SQL> SELECT ename, sal FROM emp WHERE ROWNUM < 2
2 ORDER BY emp.sal;
---------- ---------
SMITH 800
SQL> 1
1* SELECT ename, sal FROM emp WHERE ROWNUM < 2
SQL> c/emp/emp e
2* ORDER BY emp.sal
SQL> /
ORDER BY emp.sal
*
ERROR at line 2:
ORA-00904: invalid column name
Received on Sat Jan 08 2005 - 00:51:12 CET