Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: Is it possible this nested table?

Re: Is it possible this nested table?

From: Michel Cadot <micadot_at_netcourrier.com>
Date: Mon, 20 Dec 1999 18:31:41 +0100
Message-ID: <83lp69$8ie$1@news3.isdnet.net>


It is possible but "values" is a reserved word:

v815> create type opmode_type as object(   2 name varchar(10));
  3 /

Type created.

v815> create table opmode_table of opmode_type;

Table created.

v815> create type value_type as object(   2 value number,
  3 opmode ref opmode_type);
  4 /

Type created.

v815> create type value_table as table of value_type;   2 /

Type created.

v815> create type parameter_type as object(   2 name varchar(10));
  3 /

Type created.

v815> create table parameter_values_table(   2 parameter parameter_type,
  3 values value_table)
  4 nested table values store as parameter_values; values value_table)
*
ERROR at line 3:
ORA-00904: invalid column name

If you enclose values with double-quotes that's work:

v815> create table parameter_values_table(   2 parameter parameter_type,
  3 "values" value_table)
  4 nested table "values" store as parameter_values;

Table created.

You can check the reserved words with the following view:

v815> select keyword from v$reserved_words where keyword='VALUES';

KEYWORD



VALUES 1 row selected.

--
Have a nice day
Michel

Adolfo Sánchez <adfsanchez_at_gmv.es> a écrit dans le message : 385E585C.337CF6ED_at_gmv.es...
> Hi all,
>
> Why there is an error in this sql file when I create the table
> parameter_values_table?
>
> drop type parameter_type;
> drop type value_table;
> drop type value_type;
> drop table opmode_table;
> drop type opmode_type;
>
> create type opmode_type as object(
> name varchar(10));
> /
>
> create table opmode_table of opmode_type;
>
> create type value_type as object(
> value number,
> opmode ref opmode_type);
> /
>
> create type value_table as table of value_type;
> /
>
> create type parameter_type as object(
> name varchar(10));
> /
>
> create table parameter_values_table(
> parameter parameter_type,
> values value_table)
> nested table values store as parameter_values;
>
>
> --
> ____________________________________________________________________
> Adolfo Sánchez Domínguez GMV, S.A. Grupo de Mecánica de Vuelo
> mailto:adfsanchez_at_gmv.es Sector Foresta,1. TRES CANTOS
> PHO: +34 91 806 4443 E-28760 MADRID (SPAIN)
> FAX: +34 91 806 4641 http://www.gmv.es
>
>
Received on Mon Dec 20 1999 - 11:31:41 CST

Original text of this message

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