Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.tools -> Re: SQL question
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)
Received on Thu May 17 2001 - 11:19:30 CDT
![]() |
![]() |