RE: ORA-00905: missing keyword

From: <Dominic.Brooks_at_barclayscapital.com>
Date: Fri, 11 Feb 2011 12:34:50 +0000
Message-ID: <853BE8E3785A554D92010F1FB6C0B279AE3E9BCF_at_LDNPCMMGMB11.INTRANET.BARCAPINT.COM>



> anagrafica as aua

'AS' can be used with column aliases not table aliases

-----Original Message-----
From: oracle-l-bounce_at_freelists.org [mailto:oracle-l-bounce_at_freelists.org] On Behalf Of jose soares Sent: 11 February 2011 12:28
To: ORACLE-L
Subject: ORA-00905: missing keyword

Hi all,

What's wrong with this query?

SELECT DISTINCT count(*) FROM scadenziario left join operatore ON
scadenziario.id_veterinario_programmato=operatore.id

left join anagrafica     ON operatore.id_anagrafica=anagrafica.id
join unita_aziendale     ON scadenziario.id_unita_aziendale = 
unita_aziendale.id
join anagrafica as aua ON aua.id = unita_aziendale.id_anagrafica WHERE id_piano= 23

it gives me this error:

      cx_Oracle.DatabaseError: ORA-00905: missing keyword

I tried it in PostgreSQL and it works.

Thanks for any help.

j

--
http://www.freelists.org/webpage/oracle-l


_______________________________________________

This e-mail may contain information that is confidential, privileged or otherwise protected from disclosure. If you are not an intended recipient of this e-mail, do not duplicate or redistribute it by any means. Please delete it and any attachments and notify the sender that you have received it in error. Unless specifically indicated, this e-mail is not an offer to buy or sell or a solicitation to buy or sell any securities, investment products or other financial product or service, an official confirmation of any transaction, or an official statement of Barclays. Any views or opinions presented are solely those of the author and do not necessarily represent those of Barclays. This e-mail is subject to terms available at the following link: www.barcap.com/emaildisclaimer. By messaging with Barclays you consent to the foregoing.  Barclays Capital is the investment banking division of Barclays Bank PLC, a company registered in England (number 1026167) with its registered offic
 e at 1 Churchill Place, London, E14 5HP.  This email may relate to or be sent from other members of the Barclays Group.
_______________________________________________
--
http://www.freelists.org/webpage/oracle-l
Received on Fri Feb 11 2011 - 06:34:50 CST

Original text of this message