Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Column alias- Can't do this?
What is is_number function? do you mean to_number?
You cannot use select column aliases in where clause. They can be use only in order by clause.
You cannot use group function in where clause. You have to use having clause.
Your query becomes:
select data, avg(to_number(value)) as col1
from apatest
group by data
having avg(to_number(value)) is not null
/
Regards.
Antonio Pascual a écrit dans le message <7ptk3e$5ku_at_nntpa.cb.lucent.com>...
>SQL> r
> 1 select data, avg(is_number(value)) as col1
> 2 from apatest
> 3 where col1 is not null
> 4* group by dato
>where col1 is not null
> *
>ERROR at line 3:
>ORA-00904: invalid column name
>
>I Can't a column alias in the where clause?
>
>regards,
>
>Antonio.
>
>
Received on Tue Aug 24 1999 - 04:23:24 CDT