Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: Column alias- Can't do this?

Re: Column alias- Can't do this?

From: Michel Cadot <micadot_at_netcourrier.com>
Date: Tue, 24 Aug 1999 11:23:24 +0200
Message-ID: <7ptobh$47q$1@oceanite.cybercable.fr>


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

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US