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

Home -> Community -> Usenet -> c.d.o.server -> Re: nested identifier

Re: nested identifier

From: <fitzjarrell_at_cox.net>
Date: 19 Sep 2006 13:09:37 -0700
Message-ID: <1158696577.397651.301330@m73g2000cwd.googlegroups.com>

tawright915 wrote:
> I'm trying this query:
>
> select distinct a.p_no, c.p_no
> from premise a, street_name b
> where a.k_str_nm = b.k_str_nm
> and exists(select '1'
> from premise c,
> street_name d
> where c.ky_str_nm = d.ky_str_nm
> and c.ky_prem_no <> a.ky_prem_no
> and c.ky_str_nm <> a.ky_str_nm
> and c.ad_serv_str_no = a.ad_serv_str_no);
>
> I get this error:
> SQL> @overlapping.sql
> select distinct a.p_no, c.p_no
> *
> ERROR at line 1:
> ORA-00904: "C"."P_NO": invalid identifier
>
>
> SQL>
>
> Why an I not able to see this identifier? I thought nesting it was
> okay?
>
> Thanks
> Tom

You're not 'nesting', that query is in an EXISTS condition. As such you cannot use any part of its select list in the main SELECT.

David Fitzjarrell Received on Tue Sep 19 2006 - 15:09:37 CDT

Original text of this message

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