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: mistake, error, or something else ?

Re: mistake, error, or something else ?

From: Rob Cowell <rjc4687_at_hotmail.com>
Date: Mon, 27 Oct 2003 14:26:26 +0000 (UTC)
Message-ID: <3F9D2B11.4DF4D494@hotmail.com>

Daniel Morgan wrote:
>
> mbrugo_at_despammed.com wrote:
>
> >Hi people.
> >I've this query:
> >
> >select a,b,c from t1
> >where c in (select distinct c from t2);
> >
> >
> >this query run succesfully BUT:
> >
> >select distinct c from t2
> >give me: ora-904 Invalid column name.
> >
> >WHY ????
> >
> >i've no synonym or other objects
> >
> >t1 has 3 columns, a,b,c
> >t2 has 2 columns d,e
> >
> >Tia
> >
> >Mike
> >
> >
> Which part of "t2 has 2 columns d,e" would lead you to believe that
> "select distinct c from t2" would be successful?
>
> --
> Daniel Morgan

But it is 'sucessful'. Well it won't retrieve anything, but it's valid syntax.

(select distinct c from t2)

in this sub query is the same as

(select distinct t1.c from t2)

and that's legal, but fairly useless code. Received on Mon Oct 27 2003 - 08:26:26 CST

Original text of this message

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