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

Home -> Community -> Usenet -> c.d.o.tools -> subqueries in from clause

subqueries in from clause

From: Sten Loecher <sl13_at_inf.tu-dresden.de>
Date: Tue, 19 Dec 2000 16:32:32 +0100
Message-ID: <3A3F7F90.9572D22F@inf.tu-dresden.de>

Hi all,

I tried to make a query like this:

select * from COMPANY SELF
where exists
 (select PID from
   (select PID from PERSON where PID in
    (select PID from EMPLOYMENT where CID in
(select CID from COMPANY where CID = SELF.CID))))

(PID and CID are just some columns of the tables PERSON and COMPANY respectivly, EMPLOYMENT is an association table).

Even if it might seem a little bit crazy to write a query like that, I really need to do it that way. So,
I got the following error:

(select CID from COMPANY where CID = SELF.CID))))

*
ERROR at line 6:
ORA-00904: invalid column name

Does anyone know about restrictions in subqueries performed in the from clause of some query. I could not find any Information in the documentation.

Thanks for any help,

Sten

sl13_at_inf.tu-dresden.de Received on Tue Dec 19 2000 - 09:32:32 CST

Original text of this message

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