Quantcast
Channel: dBforums – Everything on Databases, Design, Developers and Administrators
Viewing all articles
Browse latest Browse all 13329

Can we use REF in nested table

$
0
0
I tried to do the folowing. it came up with an error message.

create type person_ty as object(
name varchar2(20),
sname varchar2(20),
dob date);

create table person_objtbl of person_ty

I inserted some value in person_objtbl

create or replace type nest_person3 as table of ref person_ty


CREATE TABLE customer13
( customer_id CHAR(10),
customer3 nest_person3 )
NESTED TABLE customer3 STORE AS customer_nest_store2


It works fine upto here but while making a nested table as follows

INSERT INTO customer13 SELECT
'1001', nest_person3(ref (p)from person_tbl p WHERE p.first_name = 'fred'
);

or also tried

INSERT INTO customer13 SELECT
'1001',ref (p)from person_tbl p WHERE p.first_name = 'fred'
;


please help .. the last error I get is missing right parenthesis ..

thank you

Viewing all articles
Browse latest Browse all 13329

Trending Articles