Can I use an alias name is a where clause
From: Lig <lignite_at_iol.ie>
Date: Wed, 09 Mar 2005 23:02:47 +0000
Message-ID: <pgLXd.49194$Z14.37780_at_news.indigo.ie>
[Quoted] [Quoted] The following select statement yeilds an error message ORA-00904: [Quoted] "Total": invalid identifier.
Date: Wed, 09 Mar 2005 23:02:47 +0000
Message-ID: <pgLXd.49194$Z14.37780_at_news.indigo.ie>
[Quoted] [Quoted] The following select statement yeilds an error message ORA-00904: [Quoted] "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?
[Quoted] [Quoted] 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 Thu Mar 10 2005 - 00:02:47 CET