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 -> Re: SQL question

Re: SQL question

From: John Edward Scott <admin_at_NOdaedalus-soln.demon.co.ukSPAM>
Date: Thu, 17 May 2001 22:15:37 +0100
Message-ID: <990134082.26249.0.nnrp-13.d4e495f5@news.demon.co.uk>

Nick,

Unless I've misunderstood him, he was declared the column AN to be of type ANIMALE. Hence the definition of the object type.

John.

"nick" <nick-love_at_juno.com> wrote in message news:tg89lsch5cm1c4_at_corp.supernews.com...
>
> John Edward Scott wrote:
> >
> >
> > You need to alias the table, try using
> >
> > select r.id, r.an.nome from animali r;
> >
> > John.
> >
> > "Michele de Concilio" <mdeconcilio_at_sge.it> wrote in message
> > news:3B03EB54.E8015132_at_sge.it...
> > > I've created a type with this statement:
> > > Create Type animale as Object(
> > > nome varchar2(25),
> > > tipo varchar2(25)
> > > );
> > > and it works.
> > >
> > > Then I created a table:
> > > Create table Animali(
> > > ID number,
> > > AN animale);
> > > and it works too.
> > >
> > > Then I insert a new record:
> > > Insert into ANIMALI Values(1, Animale('bobby', 'dog'));
> > > and it works.
> > >
> > > But if i write:
> > > SELECT ID, AN.nome from animali;
> > > *
> > > it tells me "invalid column name"
> > >
> > > Can someone help me to find the error?
> > > I use Oracle 8.1.6 and I find this example in the documentation.
> > >
> > > Thank you in advance.
> > > --
> > > "Guai a coloro che il Signore trover ad occhi asciutti"
> > > "Blame on them the Lord will find with dry eyes"
> > > (Gustavo Gutierrez)
> >
> > Well u created your table u shouldn't leave a space between the "AN
> animale", try this.... AN_ANIMAL... Oh if u made up your mind using
> lower_case than have all the columns in lower_case... Don't interchange
> them, u could but when u search the table u gotta type in the same letter
> case as u did when u created the table.
> Create table Animali(
> ID number,
> AN_ANIAMLE VARCHAR2(40));
>
> Now search the table for the information!!
>
> SELECT ID, AN_ANIMALE
> FROM ANIMALI;
>
>
>
>
> --
> Posted via CNET Help.com
> http://www.help.com/
Received on Thu May 17 2001 - 16:15:37 CDT

Original text of this message

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