Re: ORA-00933: SQL command not properly ended

From: Igor Neyman <igor.neyman_at_gmail.com>
Date: Fri, 4 Jan 2013 11:29:57 -0500
Message-ID: <CAJoeKmtXqd7p7uv02rN6NNO-Csc3J+bDZQucbS=TqSxbAi3umg_at_mail.gmail.com>



Get rid of "as" for table aliases:
select v.articolo,fs.descrizione as
fontes,s.articolo,s.importo_min,s.importo_max from norma s join
norma v on s.id = v.id_norma_sanzionatoria join fonte fv on v.id_fonte=fv.id join fonte fs on s.id_fonte=fs.id;

Regards,
Igor Neyman

On Fri, Jan 4, 2013 at 11:07 AM, Jose Soares <jose.soares_at_sferacarta.com>wrote:

> Hi all,
>
> I have a query that succeed in postgres but it fails in oracle and I
> don't know why?
>
> select v.articolo,fs.descrizione as
> fontes,s.articolo,s.importo_min,s.importo_max from norma as s join norma
> as v on s.id = v.id_norma_sanzionatoria join fonte as fv on
> v.id_fonte=fv.id join fonte as fs on s.id_fonte=fs.id;
>
> articolo | fontes | articolo | importo_min |
> importo_max
>
> ------------------+--------------+---------------+-------------+-------------
> articolo violata | DLG 431/2008 | sanzionatoria | 700.00 | 800.00
> (1 row)
>
> select v.articolo,fs.descrizione as
> fontes,s.articolo,s.importo_min,s.importo_max from norma as s join norma
> as v on s.id = v.id_norma_sanzionatoria join fonte as fv on
> v.id_fonte=fv.id join fonte as fs on s.id_fonte=fs.id;
>
> cx_Oracle.DatabaseError: ORA-00933: SQL command not properly ended
>
> --
> http://www.freelists.org/webpage/oracle-l
>
>
>

--
http://www.freelists.org/webpage/oracle-l
Received on Fri Jan 04 2013 - 17:29:57 CET

Original text of this message