Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Can I use an alias name is a where clause
The following select statement yeilds an error message ORA-00904:
"Total": invalid identifier.
select t.a + t.b + t.c Total
from some_table t
where Total > 0
Why can't the alias Total be used in the Where clause?
Is there any workaround other than doing something horrible like below
select *
from (select t.a + t.b + t.c Total
from some_table t)
where Total > 0
Cheers
Lig
Received on Wed Mar 09 2005 - 17:02:47 CST