I can use a subquery alias in ORDER BY but not in a WHERE clause, why?
862493May 17 2011 — edited May 17 2011Hello everybody,
this is my first post in the forum and I'm a pl/sql beginner. Thank you for any advice an please excuse my bad english.
SELECT 'TEST', (SELECT 50 FROM DUAL) COUNT_SUM
FROM DUAL
WHERE COUNT_SUM > 50
Why can I not use COUNT_SUM in the WHERE clause? How should I do this? If I use COUNT_NUM in ORDER BY it works, but I need such a statement in such many situations. Please help me to find a solution for this or to explain me why it doesn't work
I started with pl/sql for some weeks ago and I'm not able to find an answer to this problem.
Thank you
Marius