Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: How to arrange this query ???
On 1 Aug 2006 07:49:59 -0700, etantonio_at_libero.it wrote:
>Ciao,
>the query that works for me is the following :
>
>SELECT
> SIGN(COUNT(MTA.key1)) as "HiddenDestinoAssociato" ,
> MDA.COD_ABACUS "Cod. <br> Destino" ,
> MDA.Servizio "Servizio"
>
>from
> MAPLVANAG_DESTINI_ALL MDA , mapltelem_anag MTA
>
>where
> MDA.COD_abacus = MTA.key1(+)
>and MDA.SERVIZIO = MTA.key2(+)
>
>GROUP BY MDA.COD_abacus, MDA.SERVIZIO
>
>
>now I need to add another restriction regarding HiddenDestinoAssociato
>that have to be only 1 so I insert the following line in the where
>
> and SIGN(COUNT(MTA.key1)) == 1
>
>but Oracle signals to me an error, what happens ???
>
>Thanks
>
>Antonio D'Ottavio
>www.etantonio.it/en
simple
1 You are still top-posting. You are not human?
2 Group functions are only allowed in the HAVING clause.
Elementary SQL.
-- Sybrand Bakker, Senior Oracle DBAReceived on Tue Aug 01 2006 - 13:02:19 CDT
![]() |
![]() |