Results 1 to 2 of 2
  1. #1
    Join Date
    Nov 2012
    Posts
    3

    Unanswered: Can we use REF in nested table

    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

  2. #2
    Join Date
    Aug 2003
    Location
    Where the Surf Meets the Turf @Del Mar, CA
    Posts
    7,776
    Provided Answers: 1
    other than adding confusion, complication & frustration what is advantage of TYPE datatype?
    You can lead some folks to knowledge, but you can not make them think.
    The average person thinks he's above average!
    For most folks, they don't know, what they don't know.
    Good judgement comes from experience. Experience comes from bad judgement.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •