How do I update a Nested Table of inherited Object Types?

Does anyone know why the following line (commented out) doesn't work and what I can do? Is there some way to cast the column I am trying to update? I think I am going crazy....
create or replace type person_ot as object (name varchar2(10)) not final;
create or replace type student_ot under person_ot (s_num number) not final;
create type person_tt as table of person_ot;
declare
lv_person_list person_tt;
lv_sql varchar2(1000);
ref_cur sys_refcursor;
begin
lv_sql:= 'select new student_ot(''fred'', 100) from dual
union all
select new student_ot(''sally'', 200) from dual';
open ref_cur for lv_sql;
fetch ref_cur bulk collect into lv_person_list;
close ref_cur;
dbms_output.put_line(lv_person_list.count);
for i in lv_person_list.first..lv_person_list.last loop
lv_person_list(i).name := initcap(lv_person_list(i).name ); -- This works!
lv_person_list(i).s_num := 9999;  Why doesn't this line work and how can I update the column s_num ??? :-(
end loop;
end;
/

Hi Tubby - You are right...It would make sense to create the Type as type of student_ot. Only problem is I am trying to keep it generic. I will include full listing to show what I am doing...
create or replace type person_ot as object (name varchar2(10)) not final;
create or replace type student_ot under person_ot (s_num number) not final;
create type person_tt as table of person_ot;
create table persons of person_ot;
declare
lv_person_list person_tt;
lv_sql varchar2(1000);
ref_cur sys_refcursor;
begin
lv_sql:= 'select new student_ot(''fred'', 100) from dual
union all
select new student_ot(''sally'', 200) from dual';
open ref_cur for lv_sql;
fetch ref_cur bulk collect into lv_person_list;
close ref_cur;
for i in lv_person_list.first..lv_person_list.last loop
lv_person_list(i).name := initcap(lv_person_list(i).name );
lv_person_list(i).s_num := 9999;*                             Why doesn't this line work?? :-(
end loop;
forall i in lv_person_list.first..lv_person_list.last
insert into persons values lv_person_list(i);
end;
/

Similar Messages

  • Require help on Array of Nested tables and Oracle Object type

    Hi All,
    I have a scenario where I have some millions of records received from a flat file and the record is stored in Table as below:
    Tablename: FILE_RECORD
    Rows:
    FILE_REG_ID = 1
    RECORD_NBR = 1     
    PROCESSED_IND = U
    RECORD= 00120130326006A
    FILE_REG_ID = 1
    RECORD_NBR = 2     
    PROCESSED_IND = U
    RECORD= 00120130326003
    1) I have to read these records at once and
    a) Split the RECORD column to get various other data Eg: Fld1=001, Fld2=20130326, Fld3 = 003
    b) send as an Array to Java.
    2) Java will format this into XML and sent to other application.
    3) The other application returns a response as Successful or Failure to Java in XML
    4) Java will send RECORD_NBR and the corresponding response as Success or Failure back to PLSQL
    5) PLSQL should match the RECORD_NBR and update the PROCESSED_IND = P.
    I 'm able to achieve this using SQL Table type by creating a TYPE for Each of the fields (Flds) however the problem is Java cannot Access the parameters as the TYPE are of COLUMN Types
    Eg: For RECORD_NBR
    SUBTYPE t_record_nbr IS FILE_RECORD.T010_RECORD_NBR%TYPE;
    Can you please let me know how I can achieve this to support Java, I know one way that is by creating an OBJECT TYPE and a TABLE of the OBJECT TYPE.
    Eg: T_FILE_RECORD_REC IS OBJECT
    FILE_REG_ID number(8), RECORD_NBR number (10), PROCESSED_IND varchar2(1), RECORD varchar(20)
    Create type T_FILE_RECORD_TAB IS TABLE OF T_FILE_RECORD_REC
    However I'm facing a problem to populate an Array of records, I know I'm missing something important. Hence please help.
    It would be helpful to provide some guidelines and suggestions or Pseudo or a Code to achieve this. Rest all I can take up further.
    Thanks in advance,

    I know once way that is creating a OBJECT TYPE and a TABLE of OBJECT TYPE, howeve I feel I'm missing something to achieve this.You're right, you need SQL object types created at the database level. Java doesn't know about locally defined PL/SQL types
    However you can do without all this by creating the XML directly in PL/SQL (steps 1+2) and passing the document to Java as XMLType or CLOB.
    Are you processing the records one at a time?

  • View of values in nested table attribute of object type

    Hi,
    I have:create or replace type ctx_line is object (
      ctx_name  varchar2(40),
      ctx_value varchar2(1000)
    create or replace type ctx_tab is table of ctx_line;
    create type tp as object (
      id      number,
      ctx     ctx_tab
    create table tt of tp nested table ctx store as ctx_nesttab;
    create or replace view v as
    SELECT VALUE(o).id as id
      FROM tt o;Now I want to create an another view containing fields ctx_name, ctx_value and a key (maybe NESTED_TABLE_ID?) to the parent record in tt table. I must be able to join that view to each other. This is necessary because I will use that views in Forms 4.5 (which do not support nested tables).
    Can someone help me, please?

    I'm not sure what you are looking for exactly but is it something like this?
    SELECT id
         , p.ctx_name
         , p.ctx_value
    FROM   tt
         , TABLE(ctx) pWith the following test data:
    INSERT INTO tt VALUES(1,CTX_TAB(CTX_LINE('A','SOME VALUE1')));
    INSERT INTO tt VALUES(1,CTX_TAB(CTX_LINE('B','SOME VALUE2')));
    INSERT INTO tt VALUES(1,CTX_TAB(CTX_LINE('B','SOME VALUE2')));this is the result:
    SQL> SELECT id
      2       , p.ctx_name
      3       , p.ctx_value
      4  FROM   tt
      5       , TABLE(ctx) p
      6  /
            ID CTX_NAME                                 CTX_VALUE
             1 A                                        SOME VALUE1
             1 B                                        SOME VALUE2
             1 B                                        SOME VALUE2

  • How to assign Values to nested table and pass as parameter to procedure?

    How to assign Values to nested table and pass as parameter to procedure?
    Below is the Object and its type
    create or replace type test_object1 as object
    val1 varchar2(50),
    val2 varchar2(50),
         val3 varchar2(50)
    create or replace type test_type1 is table of test_object1;
    create or replace type test_object2 as object
    val1 varchar2(50),
    val2 varchar2(50),
         val3 varchar2(50)
    create or replace type test_type2 is table of test_object2;
    GRANT ALL ON test_object1 TO PUBLIC;
    GRANT ALL ON test_type1 TO PUBLIC;
    GRANT ALL ON test_object2 TO PUBLIC;
    GRANT ALL ON test_type2 TO PUBLIC;
    here is the table made of object type:
    create table test_object_tpe
    sl_num NUMBER,
    description VARCHAR2(100),
    main_val1 test_type1,
    main_val2 test_type2
    NESTED TABLE main_val1 STORE AS tot1
    NESTED TABLE main_val2 STORE AS tot2;
    here is the procedure which inserts values into nested table:
    PROCEDURE INSERT_TEST_DATA(sl_num IN NUMBER,
    description IN VARCHAR2,
    p_main_val1 IN test_type1,
    p_main_val2 IN test_type2
    IS
    BEGIN
    FOR rec in p_main_val1.first..p_main_val1.last
    LOOP
    INSERT INTO xxdl.test_object_tpe
    sl_num,
    description,
    main_val1,
    main_val2
    VALUES
    sl_num
    ,description
    ,test_type1 (test_object1(
    p_main_val1(rec).val1,
                                       p_main_val1(rec).val2,
    p_main_val1(rec).val3
    ,test_type2 (test_object2( p_main_val2(rec).val1,
                        p_main_val2(rec).val2,
                        p_main_val2(rec).val3
    END LOOP;
    commit;
    END INSERT_TEST_DATA;
    here is the anonymoys block which assigns values to the object type and pass values into the procedure:
    set serveroutput on;
    declare
    p_sl_num NUMBER := 1001;
    p_description VARCHAR2(50) := 'Testing Val1';
    inval1 test_type1 := test_type1();
    inval2 test_type2 := test_type2();
    begin
    inval1(1).val1 := 'testx1';
    inval1(1).val2 := 'testx2';
    inval1(1).val3 := 'testx3';
    inval2(1).val1 := 'testy1';
    inval2(1).val2 := 'testy2';
    inval2(1).val3 := 'testy3';
    CSI_PKG.INSERT_TEST_DATA(sl_num => p_sl_num,
    description => p_description,
    p_main_val1 => inval1,
    p_main_val2 => inval2
    end;
    Can anybody correct me.
    Thanks,
    Lavan

    Thanks for posting the DDL and sample code but whenever you post provide your 4 digit Oracle version (result of SELECT * FROM V$VERSION).
    >
    How to assign Values to nested table and pass as parameter to procedure?
    >
    Well you are doing almost everything wrong that could be done wrong.
    Here is code that works to insert data into your table (the procedure isn't even needed).
    declare
    p_sl_num NUMBER := 1001;
    p_description VARCHAR2(50) := 'Testing Val1';
    inval1 test_type1 := test_type1();
    inval2 test_type2 := test_type2();
    begin
    inval1.extend();
    inval1(1) := test_object1('testx1', 'testx2', 'testx3');
    inval2.extend();
    inval2(1) := test_object2('testy1', 'testy2', 'testy3');
    INSERT INTO test_object_tpe
    sl_num,
    description,
    main_val1,
    main_val2
    VALUES
    (p_sl_num, p_description, inval1, inval2);
    commit;
    end;
    /See Example 5-15 Referencing a Nested Table Element in Chap 5 Using PL/SQL Collections and Records in the PL/SQL doc
    http://docs.oracle.com/cd/B28359_01/appdev.111/b28370/collections.htm#CJABEBEA
    1. You don't even need the procedure since all it does is a simple INSERT into the table which you can do directly (see my code above)
    inval1(1).val1 := 'testx1';There is no element one (1) of 'inval1' since you haven't created any elements yet. You need to EXTEND the collection to add an element
    inval1.extend();And then there is an empty element but 'inval1' is a container for objects of type 'test_object1' not for scalars like 'val1', 'val2', and 'val3'.
    So you can't do
    inval1(1).val1 := 'testx1';You have to create an instance of 'test_object1'
    inval1(1) := test_object1('testx1', 'testx2', 'testx3');And so on for the other collection
    You don't need the procedure (as my sample code shows) but once you populate the variables properly it will work.

  • Updating a nested table of references

    Hi,
    Can anyone tell me the syntax for updating a nested table of references?
    For example:
    CREATE TYPE purchaseorder_ob AS OBJECT(
    order_number NUMBER(6),
    shipping_date DATE,
    city VARCHAR2(30),
    orderlineitem orderlineitem_va);
    CREATE TYPE refpurchaseorder_tab AS TABLE of REF purchaseorder_ob;
    CREATE TYPE customer_ob AS OBJECT(
    customer_number NUMBER(5),
    customer_name VARCHAR2(50),
    city VARCHAR2(30),
    reftopurchaseorder refpurchaseorder_tab)
    NOT FINAL;
    CREATE TABLE customer_t OF customer_ob (customer_number Primary key)
    NESTED TABLE reftopurchaseorder STORE AS reftopurchaseorder_nt;
    UPDATE customer_t
    SET reftopurchaseorder = ???????
    WHERE customer_number = 1;
    What do I put for ??????
    Any help would be greatly appreciated.
    Fernanda.

    Type declarations are not complete, nevertheless for example:
    SQL> CREATE TYPE orderlineitem_va AS VARRAY(10) of NUMBER(10);
      2  /
    Type created.
    SQL> CREATE OR REPLACE TYPE purchaseorder_ob AS OBJECT(
      2  order_number NUMBER(6),
      3  shipping_date DATE,
      4  city VARCHAR2(30),
      5  orderlineitem orderlineitem_va);
      6  /
    Type created.
    SQL> CREATE TYPE refpurchaseorder_tab AS TABLE of REF purchaseorder_ob;
      2  /
    Type created.
    SQL> CREATE TYPE customer_ob AS OBJECT(
      2  customer_number NUMBER(5),
      3  customer_name VARCHAR2(50),
      4  city VARCHAR2(30),
      5  reftopurchaseorder refpurchaseorder_tab)
      6  NOT FINAL;
      7  /
    Type created.
    SQL> CREATE TABLE customer_t OF customer_ob (customer_number Primary key)
      2  NESTED TABLE reftopurchaseorder STORE AS reftopurchaseorder_nt;
    Table created.
    SQL> desc customer_t
    Name                                      Null?    Type
    CUSTOMER_NUMBER                           NOT NULL NUMBER(5)
    CUSTOMER_NAME                                      VARCHAR2(50)
    CITY                                               VARCHAR2(30)
    REFTOPURCHASEORDER                                 REFPURCHASEORDER_TAB
    SQL> insert into customer_t values(customer_ob(1,'James','Dublin',null));
    1 row created.
    SQL> commit;
    Commit complete.
    SQL> create table purchase_t of purchaseorder_ob;
    Table created.
    SQL> insert into purchase_t values(purchaseorder_ob(1,sysdate,'London',null));
    1 row created.
    SQL> insert into purchase_t values(purchaseorder_ob(2,sysdate,'London',null));
    1 row created.
    SQL> commit;
    Commit complete.
    SQL> select ref(p) from purchase_t p;
    REF(P)
    000028020918B2D893716E47CE91690542A6898D71432C6F6282764771BFD25979B8BCB3DB01000C
    2D0000
    0000280209EA531A4F6833495A9AF846C57A846A4D432C6F6282764771BFD25979B8BCB3DB01000C
    2D0001
    SQL> update customer_t
      2  set REFTOPURCHASEORDER =
      3  CAST(MULTISET(SELECT REF(p) FROM purchase_t p) AS REFPURCHASEORDER_TAB)
      4  WHERE customer_number = 1
      5  /
    1 row updated.
    SQL> commit;
    Commit complete.
    SQL> select * from customer_t;
    CUSTOMER_NUMBER CUSTOMER_NAME
    CITY
    REFTOPURCHASEORDER
                  1 James
    Dublin
    REFPURCHASEORDER_TAB(000022020818B2D893716E47CE91690542A6898D71432C6F6282764771B
    FD25979B8BCB3DB, 0000220208EA531A4F6833495A9AF846C57A846A4D432C6F6282764771BFD25
    979B8BCB3DB)Rgds.

  • How can I update a customized table from a text document?

    Hi,
    I am one sample file. The file is an text document. From this .txt file how can I update a customized table in SAP.
    How can I Update the fields in the Customized table.
    Thanks & Regards,
    NManohar.

    use the Function module GUI_UPLOAD or WS_UPLOAD and give the path and the file name from where the data has to be uploaded. in table parameter give the iternal table
    CALL FUNCTION 'GUI_UPLOAD'
      EXPORTING
        filename                      =
      FILETYPE                      = 'ASC'
      HAS_FIELD_SEPARATOR           = ' '
      HEADER_LENGTH                 = 0
      READ_BY_LINE                  = 'X'
      DAT_MODE                      = ' '
      CODEPAGE                      = ' '
      IGNORE_CERR                   = ABAP_TRUE
      REPLACEMENT                   = '#'
      CHECK_BOM                     = ' '
      VIRUS_SCAN_PROFILE            =
      NO_AUTH_CHECK                 = ' '
    IMPORTING
      FILELENGTH                    =
      HEADER                        =
      tables
        data_tab                      =
    EXCEPTIONS
      FILE_OPEN_ERROR               = 1
      FILE_READ_ERROR               = 2
      NO_BATCH                      = 3
      GUI_REFUSE_FILETRANSFER       = 4
      INVALID_TYPE                  = 5
      NO_AUTHORITY                  = 6
      UNKNOWN_ERROR                 = 7
      BAD_DATA_FORMAT               = 8
      HEADER_NOT_ALLOWED            = 9
      SEPARATOR_NOT_ALLOWED         = 10
      HEADER_TOO_LONG               = 11
      UNKNOWN_DP_ERROR              = 12
      ACCESS_DENIED                 = 13
      DP_OUT_OF_MEMORY              = 14
      DISK_FULL                     = 15
      DP_TIMEOUT                    = 16
      OTHERS                        = 17
    IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    and finally use insert command to update the database table with the data

  • How can i use the nested table in form 6i

    how can i use the nested table in the form 6i
    ( i.e i want to insert record into the nestred table field ).
    bye siddharth singh

    Nested tables are not supported in Forms 6i, only simple object tables.

  • How can I update the trigger table?

    I need a insert trigger on a table and also wants to insert the result value in one of its field.
    it gives mutating error........
    so wots the way of updating it? how can i update the same table.

    For example like this (inside the BEGIN/END section of the trigger):
    :NEW.Col2 := :NEW.Col1;
    C.

  • How can i update the ADRT table REMARK field

    How can i update the ADRT table REMARK field
    by using only function modules or BAPI's not by direct update's
    please help me
    i need it urgently

    Hi,
    you can try this code:
        SELECT SINGLE * FROM KNA1 WHERE KUNNR = wa_kunnr.
        IF sy-subrc = 0.
          CLEAR adrct.
          SELECT SINGLE * FROM adrct WHERE addrnumber = kna1-adrnr.
          IF sy-subrc = 0.
            adrct-remark = wa_remark.
            MODIFY adrct.
          ENDIF.
        ENDIF
    best regards,
    Thangesh

  • If record is in application server how do u update the single table

    hi
    could anybody tel me
    if record is in application server how do u update the single table
    by using direct input method

    If your Flash player/plugin is older, the only way is to go to Adobe's site (use Limnos' link) and download the full installer. A .DMG file, which you doubleclick to have it mount on the desktop. Inside is the Flash installer app you doubleclick to run and have it upgrade all. Will need an Admin user account.
    After you've upgraded to the latest & greatest, currently 11.5.502.110, a Flash perfpane will show up in System Preferences, where you can set it to auto-update itself, warn you of new updates or manually check for same.

  • How to create a record for table PLAF with order type 'NB'.

    How to create a record for table PLAF with order type 'NB'(standard purchase order).
    who can tell me the T-code or some usefull information?
    Thanks.

    Hi
    This will be updated automatically when generate planned orders thru MRP. (MD02)
    regards
    Srinivas

  • Inserting into a doubly nested table through an object view

    Can anyone give me an example of an INSTEAD OF trigger that will mediate an INSERT into a doubly nested table of an Object View? Is there syntax that will allow it?

    Here's some code to demonstrate. Note that relational tables, not an object table, are used to store object instances:
    create or replace type TInnerNestedTable
    is table of varchar2(20)
    create or replace type TOuterNestedTable
    is table of TInnerNestedTable
    create or replace type TMyObject
    is object
         id     varchar2(20)
    ,     tab     TOuterNestedTable
    create
    table     T_MY_OBJECT
         id          varchar2(20)     not null
    ,     primary key (id)
    create
    table     T_MY_OBJECT_TAB_OUTER
         id          varchar2(20)     not null
    ,     outerIndex     integer          not null
    ,     primary key (id, outerIndex)
    ,     foreign key (id) references T_MY_OBJECT on delete cascade
    create
    table     T_MY_OBJECT_TAB_INNER
         id          varchar2(20)     not null
    ,     outerIndex     integer          not null
    ,     innerIndex     integer          not null
    ,     innerValue     varchar2(20)
    ,     primary key (id, outerIndex, innerIndex)
    ,     foreign key (id, outerIndex) references T_MY_OBJECT_TAB_OUTER on delete cascade
    create or replace view V_MY_OBJECT
    of TMyObject
    with object identifier (id)
    as
    select     t.id
    ,     cast(multiset(
              select     cast(multiset(
                        select     i.innerValue
                        from     T_MY_OBJECT_TAB_INNER i
                        where     i.id = o.id
                        and     i.outerIndex = o.outerIndex
                   ) as TInnerNestedTable)
              from     T_MY_OBJECT_TAB_OUTER o
              where     o.id = t.id
         ) as TOuterNestedTable)
    from     T_MY_OBJECT t
    create or replace trigger TR_II_V_MY_OBJECT
    instead of insert on V_MY_OBJECT
    for each row
    begin
         insert
         into     T_MY_OBJECT
              id
         values     (
              :new.id
         insert
         into     T_MY_OBJECT_TAB_OUTER
              id
         ,     outerIndex
         select     :new.id
         ,     rownum
         from     table(:new.tab) o;
         insert
         into     T_MY_OBJECT_TAB_INNER
              id
         ,     outerIndex
         ,     innerIndex
         ,     innerValue
         select     :new.id
         ,     o.outerIndex
         ,     rownum
         ,     value(i)
         from     (
              select     :new.id
              ,     rownum outerIndex
              ,     value(o) innerTab
              from     table(:new.tab) o
              ) o
         ,     table(o.innerTab) i;
    end;
    insert
    into     V_MY_OBJECT
    values     (
         new TMyObject(
              'A'
         ,     TOuterNestedTable(
                   TInnerNestedTable('A','B','C')
              ,     TInnerNestedTable('AA')
              ,     TInnerNestedTable('AB')
    insert
    into     V_MY_OBJECT
    values     (
         new TMyObject(
              'B'
         ,     TOuterNestedTable(
                   TInnerNestedTable('X','Y','Z')
              ,     TInnerNestedTable('Hello', 'World!')
    /Selecting from the view shows the results:
    select     value(o)
    from     V_MY_OBJECT o
    VALUE(O)(ID, TAB)
    TMYOBJECT('A', TOUTERNESTEDTABLE(TINNERNESTEDTABLE('A', 'B', 'C'), TINNERNESTEDTABLE('AA'), TINNERNESTEDTABLE('AB')))
    TMYOBJECT('B', TOUTERNESTEDTABLE(TINNERNESTEDTABLE('X', 'Y', 'Z'), TINNERNESTEDTABLE('Hello', 'World!')))
    2 rows selected.Hope that helps...
    Gerard

  • TYPE OR TABLE DEPENDENCY OF OBJECT TYPE (ORA-2303)

    제품 : SQL*PLUS
    작성날짜 : 2004-05-20
    ==================================================
    TYPE OR TABLE DEPENDENCY OF OBJECT TYPE (ORA-2303)
    ==================================================
    PURPOSE
    Type이나 table의 dependency가 있는 type을 drop하거나 replace하고자
    하면 ORA-02303 error가 난다. 이 error의 원인을 알아보도록 한다.
    Explanation
    Object의 attribute나 method를 수정하기 위해서는 object type을 drop하고 재생성
    해야 한다. Type이나 table의 dependency가 있는 type을 drop하거나 replace하고자
    하면 ORA-02303 error가 난다. Object type은 type (nested table 또는 VARRAY)
    또는 object table로써 구체적으로 표현된다. 만약 data의 보존이 필요하다면
    temporary table에 manual하게 옮겨놓아야 한다.
    SQL Reference guide에 의하면 DROP TYPE FORCE 옵션은 recommend하지 않는다.
    왜냐하면 이 옵션을 쓰게 되면 복구가 불가능하고 dependency가 있던 table들은
    access하지 못하는 결과를 초래한다.
    Example
    아래의 query 1, 2, 3은 dependency을 확인하는 query문이다.
    1. Find nested tables
    select owner, parent_table_name, parent_table_column
    from dba_nested_tables
    where (table_type_owner, table_type_name) in
    (select owner, type_name
    from dba_coll_types
    where elem_type_owner = '<typeOwner>'
    and elem_type_name = '<typeName>');
    2. Find VARRAYs
    select owner, parent_table_name, parent_table_column
    from dba_varrays
    where (type_owner, type_name) in
    (select owner, type_name
    from dba_coll_types
    where elem_type_owner = '<typeOwner>'
    and elem_type_name = '<typeName');
    3. Find object tables
    select owner, table_name
    from dba_object_tables
    where table_type_owner = '<typeOwner>'
    and table_type = '<typeName>'
    and nested = 'NO';
    Example ) Logon as Scott
    /* Create an user defined object type */
    SQL> create type object_type as object (
    col1 number,
    col2 varchar2(20))
    Type created.
    /* Create nested table type */
    SQL> create type object_ntable as table of object_type
    Type created.
    /* Create varray type*/
    SQL> create type object_varray as varray(5) of object_type
    Type created.
    /* Create parent table with nested table and varray */
    SQL> create table master (
    col1 number primary key,
    col2_list object_ntable,
    col3_list object_varray)
    nested table col2_list store as master_col2
    Table created.
    /* Create object table */
    SQL> create table object_table of object_type (col1 primary key)
    object id primary key;
    Table created.
    ORA-2303 results if attempt to drop type with dependencies
    SQL> drop type object_type;
    drop type object_type
    ERROR at line 1:
    ORA-02303: cannot drop or replace a type with type or table dependents
    위의 queery 1,2,3을 이용하여 object type dependency을 확인한다.
    -- Find nested tables utilizing object type
    SQL> select owner, parent_table_name, parent_table_column
    from dba_nested_tables
    where (table_type_owner, table_type_name) in
    (select owner, type_name
    from dba_coll_types
    where elem_type_owner = 'SCOTT'
    and elem_type_name = 'OBJECT_TYPE');
    OWNER PARENT_TABLE_NAME PARENT_TABLE_COLUMN
    SCOTT MASTER COL2_LIST
    -- Find VARRAYs utilizing object type
    SQL> select owner, parent_table_name, parent_table_column
    from dba_varrays
    where (type_owner, type_name) in
    (select owner, type_name
    from dba_coll_types
    where elem_type_owner = 'SCOTT'
    and elem_type_name = 'OBJECT_TYPE');
    OWNER PARENT_TABLE_NAME PARENT_TABLE_COLUMN
    SCOTT MASTER COL3_LIST
    -- Find object tables
    SQL> select owner, table_name
    from dba_object_tables
    where table_type_owner = 'SCOTT'
    and table_type = 'OBJECT_TYPE'
    and nested = 'NO';
    OWNER TABLE_NAME
    SCOTT OBJECT_TABLE
    참고)
    bulletin : 11576 처럼 utility을 이용하는 방법이 있다.
    우리는 여기서 주의하여야 할 것은 script $ORACLE_HOME/rdbms/admin/utldtree.sql
    을 내가 보고자 하는 user에서 돌려야 한다는 것이다.
    $sqlplus scott/tiger
    SQL> @$ORACLE_HOME/rdbms/admin/utldtree.sql
    SQL> exec deptree_fill('TYPE','SCOTT','OBJECT_TYPE');
    PL/SQL procedure successfully completed.
    SQL> select * from ideptree;
    DEPENDENCIES
    TYPE SCOTT.OBJECT_TYPE
    TYPE SCOTT.OBJECT_NTABLE
    TABLE SCOTT.MASTER
    TYPE SCOTT.OBJECT_VARRAY
    TABLE SCOTT.MASTER
    TABLE SCOTT.MASTER_COL2
    TABLE SCOTT.OBJECT_TABLE
    Reference Documents
    Korean bulletin : 11576
    <Note:69661.1>

    Hi Carsten,
    Thanks for the sharp hint. It works.
    However, when I create a table using the schema, it gives me this error:
    varray DOC."LISTOFASSIGNEDNUMBER"."ASSIGNEDNUMBER"
    ERROR at line 14:
    ORA-02337: not an object type column
    Here is the script:
    CREATE TABLE CUSTOMMANIFEST (
    ID NUMBER PRIMARY KEY,
    DOC sys.XMLTYPE
    xmltype column doc
    XMLSCHEMA "http://www.abc.com/cm.xsd"
    element "CustomManifest"
    varray DOC."LISTOFMANIFESTPORTINFO"."MANIFESTPORTINFO"
    store as table MANIFESTPORTINFO_TABLE
    (primary key (NESTED_TABLE_ID, ARRAY_INDEX))
    organization index overflow
    varray DOC."LISTOFASSIGNEDNUMBER"."ASSIGNEDNUMBER"
    store as table ASSIGNEDNUMBER_TABLE
    (primary key (NESTED_TABLE_ID, ARRAY_INDEX))
    organization index overflow
    LISTOFASSIGNEDNUMBER itself is complexType and not sure where is the error....
    You may note there are more than two hierachy/levels...
    Thanks.

  • Join table with an object type

    Hi,
    I would like ot know how to join a table with another table having an object type as a column value.
    For ex:
    Create type add_obj as object (st varchar2(10), city varchar2(10), zip varchar2(10));
    Table A
    Cust_id number
    cust_address add_obj
    Table B
    Cust_id number
    order_id number
    I want to select the complete address for each order.
    Is this the correct way to do this select:
    Select o.order_id, c.customer_id, c.cust_address.st, c.cust_address.city, c.cust_address.zip
    from table A c, table B o;
    Any leads is appreciated. Thanks in advance.

    >
    unfortunately with a crashed Oracle db I could try nothing.... Forums are for getting help and offering help in times of need.
    Will take your advice some other time. Now need help on how to select the address city, st and zip along with the order_id.
    >
    Ah - I understand - you mean before your class is over.
    Unfortunately with a crashed Oracle db you will not know if our advice is correct or not since you won't be able to test it.
    So I will offer advice some other time. Now need to get some fresh air and a hot cup of coffee.
    Let us know when you DB is back up and you have run your tests. Then if you still have any questions other forum members may decide to help you. Well - if their database is up and running that is.

  • Batch Design Capture of tables that include Object Types

    When I attempt to use the Batch Design Capture facility to capture a table that includes an Object Type the facility dies without completing.
    I am using Designer 9i / Oracle Design Editor v9.0.2.80.4.
    The Batch Design Capture facility reports the following and then exits:
    Repository connected successfully
    Server Generator 9.0.2.80.4, Wed Jun 09 17:24:33 2004
    Copyright (c) Oracle Corporation 1995, 2002. All rights reserved.
    CDS-15334 Warning: The Oracle Object Type MESSAGEHEADER_TYPE already exists in the Repository. NOMERGE_AND_SAC Rule selected
    => the captured property values will not replace the existing property values in the repository but the Rules for the Secondary Elements (SACs) will apply for their own update
    CDS-11305 Warning: Column 'E2B.MESSAGEHEADER' property DEFAULT VALUE exceeds maximum length (60) - Truncated
    The table that I am trying to capture looks like this:
    E2B
    E2B_ID NOT NULL NUMBER
    MESSAGEHEADER MESSAGEHEADER_TYPE
    DATE_TRANSMITTED DATE
    DATE_RECEIVED DATE
    DATE_ACKNOWLEDGED DATE
    ... other columns ...
    MESSAGE CLOB
    and MESSAGEHEADER_TYPE looks like this:
    MESSAGEHEADER_TYPE
    MESSAGETYPE VARCHAR2(16)
    MESSAGEFORMATVERSION VARCHAR2(3)
    MESSAGEFORMATRELEASE VARCHAR2(3)
    MESSAGENUMB VARCHAR2(100)
    MESSAGESENDERIDENTIFIER VARCHAR2(60)
    MESSAGERECEIVERIDENTIFIER VARCHAR2(60)
    MESSAGEDATEFORMAT NUMBER(3)
    MESSAGEDATE NUMBER(14)
    Is is possible to use Designer to capture tables that include object types?

    hi,
    while running the package, use the activity "Maintain Table Reduction" in phase System Analysis to include / exclude / reduce the table from transfer.
    Srila.

Maybe you are looking for

  • Dual graphics cards in late 2008 macpro?

    I've just bought an 8Core (harpertown) with the ATI2600 card and am finding the 256mb video ram a problem compared to my 4Core with the ATI 1900 XT with 512Mb video memory. (some of my filters won't render on using the 8Core 2600 that I initially cre

  • Cancelling and closing orders

    Hello, What is the difference between cancelling and closing orders?  As far as I can see, they both alter the commitment amount in item master data. The document status is also changed, one being closed and one being cancelled.  Are there any differ

  • Add New column in the Display Specification: Hit List (CGE2)

    Hi, My Scenario is to add new columns (AUTHORIZATION GROUP and CREATED BY) in CGE2 T-code. At the hitlist of the workbench in transaction CGE2 there can be selected several columns(Ex:specification,Desc.specific.type,packing name etc), but we need to

  • Installation Interrupted Error

    As far as I can determine It seems that Adobe is using MSIE on Windows 7 to display the EULA during the installation process. The installation is failing as IE 9 (64) installs and disables previous versions when service packs are applied. we get an e

  • 2 weeks of trying still iphone not recognised with itunes!!!!!!!!

    HELP!!!!!!!!!!!!!!!!!!!!! ready to smash iphone with hammer. tried everything, uninstall, UAC off, hidden admin in vista, deleting infcache1 file, everything and still cannot get iphone to sync with itunes charge battery or anything. apple support is