Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: table(cast(nested table)) : what is the column name?
yossarian wrote:
> SQL> run
> 1 declare
> 2 arr t := t () ;
> 3 x integer ;
> 4 begin
> 5 arr.extend(3);
> 6 arr(1) := 42 ;
> 7 arr(2) := 94 ;
> 8 arr(3) := 127 ;
> 9 select sum (INeedAColumnNameHere) into x from table ( cast ( arr
> as t ) ) ;
> 10* end ;
> select sum (INeedAColumnNameHere) into x from table ( cast ( arr as t
> ) ) ;
> *
> ERROR at line 9:
> ORA-06550: line 9, column 15:
> PL/SQL: ORA-00904: invalid column name
> ORA-06550: line 9, column 3:
> PL/SQL: SQL Statement ignored
>
> What column name have I to put in there?
Sorry, the answer is in the docs (surprise!):
<<<
When datatype is a scalar type, then the nested table type describes a
table with a single, scalar type column called "column_value".
>>>
Thank you. Kind regards, Y. Received on Fri May 18 2007 - 06:25:44 CDT
![]() |
![]() |