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 -> table(cast(nested table)) : what is the column name?

table(cast(nested table)) : what is the column name?

From: yossarian <yossarian99_at_operamail.com>
Date: Fri, 18 May 2007 13:12:58 +0200
Message-ID: <464d8a09$0$16026$5fc30a8@news.tiscali.it>


Hello, Oracle 9.0.1 here.

I'm stuck with the table(cast(...)) construct.

SQL> create or replace type t as table of integer ;   2 /

Type created.

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?

Thank you. Kind regards, Y. Received on Fri May 18 2007 - 06:12:58 CDT

Original text of this message

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