Re: oracle query
Date: Fri, 02 Feb 2001 22:32:54 GMT
Message-ID: <95fcin$qgb$1_at_nnrp1.deja.com>
In article <95fbbt$pbv$1_at_nnrp1.deja.com>,
Aloha Kakuikanu <alohakaku_at_yahoo.com> wrote:
> In article <95eq8n$8o2$1_at_nnrp1.deja.com>,
> Vadim Tropashko <vadimtro_at_yahoo.com> wrote:
> > In article <95ep49$7ih$1_at_nnrp1.deja.com>,
> > Aloha Kakuikanu <alohakaku_at_yahoo.com> wrote:
> > > I queried oracle
> > >
> > > select x from dual where x*x=4
> > >
> > > but got "invalid column name".
> > >
> > Well, the correct answer you might find on oracle forum. But if you
> > still want to do it that way:
> >
> > select x from (
> > select 1 as x from dummy
> > union
> > select 2 as x from dummy
> > union
> > select 3 as x from dummy)
> > where x*x=4
> >
> Thank you for your suggestion, but I really meant something else.
> Besides, your solution doesn't work for 25!
Just take a table big enough, say, all_people, and rewrite the query:
select rownum as x from all_people
Sent via Deja.com
http://www.deja.com/
Received on Fri Feb 02 2001 - 23:32:54 CET
