Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Can I use an alias name is a where clause

5 views
Skip to first unread message

Lig

unread,
Mar 9, 2005, 11:08:46 AM3/9/05
to
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

0 new messages