Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: Whats wrong with this select statement???
Try to put the avg function in a having clause instead.
-- VIncenzo Scervo <liam_2e_at_my-deja.com> wrote in message news:8a8jt2$neo$1_at_nnrp1.deja.com...Received on Mon Mar 13 2000 - 00:00:00 CST
> SQL> select s.store_nm
> 2 from store s, inventory i
> 3 where s.store_id = i.store_id and i.on_hand_qty > (avg
> (i.on_hand_qty) + 10);
> where s.store_id = i.store_id and i.on_hand_qty > (avg(i.on_hand_qty) +
> 10)
> *
> ERROR at line 3:
> ORA-00934: group function is not allowed here
>
> Thanks for the help
> Liam
>
>
> Sent via Deja.com http://www.deja.com/
> Before you buy.
![]() |
![]() |