XML attributes and object types

I want to create an XML Document of the following form
<family>
<parent attr1="val1">
<child attr2="val2" attr3="val3"/>
</parent>
</family>
Using object table and object type (for the child element), I am able to produce the following XML Document (with a "select * from family" query)
<family> <!-- rowset -->
<parent> <!-- row -->
<attr1>val1</attr1>
<child>
<attr2>val2</attr2>
<attr3>val3</attr3>
</child>
</parent>
</family>
The question is: how am I going to query these data so that the "attr" elements are mapped to attributes (using XSU only, without XSLT)?
I have already tried the following:
1. Using
SELECT attr1 as "@attr1",
f.child.attr2 "@attr2",
f.child.attr3 "@attr3"
FROM family f
all the attributes are obviously appended to the "parent" element.
2. Using nested table for "child" and the following query
SELECT attr1 as "@attr1",
CURSOR (
SELECT n.child.attr2 as "@attr2", n.child.attr3 as "@attr3"
FROM TABLE(f.child n)
) AS "child"
FROM family f
I am getting the following document
<family>
<parent attr1="val1">
<child>
<child_ROW attr2="val2" attr3="val3"/>
</child>
</parent>
</family>
Is there a smart SQL query to produce the desired document? What data types
is it recommended to use to define my db schema (object types, nested tables...)?
Thank you in advance
null

Finally, I got the desired XML format output from relational tablse using schema based XMLType views.
Wherein I created Object Types from relational table, generated the schema for the Object type, registered the schema and finally created XMLType Views for populating the XML data from Relational Tables.
I guess, you all might aware of my problem, where I got struck. Instead of printing the data in XML format I am successful in generating the XML format data Using the Query Select from BLABLA_Type_view* . I am able to print the number of rows, that I require which is in the fallowing format.
Column Name
1. SYS.XMLTYPE ----- As a row
The view I am querying for is printing the data in a string format, where in I got to do the fallowing query
SELECT SYS.XMLTYPE.getStringVal(OBJECT_VALUE) FROM BLABLA_Type_view. Which ultimately gave me the required data in XML format with tags.
Thanks for every one who tried to give a try to solve, especially "mdrake"

Similar Messages

  • Dense Rank and Object types (oracle 9i and 10g difference).

    Hi all,
    One of my queries in my procedure uses scalar subqueries and object types.
    The code works fine in 10g but not in 9i. Both Object types and Dense_rank used below are present in both 9i and 10g.
    The following is a part of a bigger query.. but this is what it comes down to when I zero in on the error.
    -- In both 9i and 10g...
    CREATE OR REPLACE TYPE t_audit_type as object(
       add_tms date,
       add_user_id varchar2(20),
       order member function match (t t_audit_type) return integer
    Type created.
    CREATE OR REPLACE TYPE BODY t_audit_type as
    order member function match   (t t_audit_type) return integer is
    begin
      if add_tms < t.add_tms then
         return -1;
      elsif add_tms > t.add_tms then
        return 1;
      else
        return 0;
      end if;
    end;
    end;
    Type body created.
    create table t ( x int, y date);
    insert into t values(1, sysdate);
    insert into t values(1, sysdate+1);
    commit;In Oracle 10g..
    select min(t_audit_type(x,y))
    keep (dense_rank first order by x) result
    from t;
    RESULT(ADD_TMS, ADD_USER_ID)
    T_AUDIT_TYPE('19-JAN-10', 'User2')In Oracle 9i....
    9i> select min(t_audit_type(x,y))
      2   keep (dense_rank first order by x) result
      3   from t;
    select min(t_audit_type(x,y))
    ERROR at line 1:
    ORA-03113: end-of-file on communication channelHave any of you seen this before..? The connection is always being terminated when I run this command.?!

    Thanks Dom for your reply.
    Here is the message I found in the trace file for the error.
    ksedmp: internal or fatal error
    ORA-07445: exception encountered: core dump [0000000100D72F84] [SIGSEGV] [Address not mapped to object] [0x000000018] [] []
    Current SQL statement for this session:
    select min(t_audit_type(x,y))
           keep(dense_rank first order by x)x
    from tI will look in metalink and see if this has been addressed before.
    Thanks...!

  • Product Attributes and Set types Tables

    Hi,
    In which Table does the Product Attributes and Set types stores in CRM?
    Can anybody tell me?
    Thanks

    Hi,
    I am not able to get you can you explain it clearly by taking this example
    I have created the Product Called Monitor
    For that Monitor i have maintained the following attributes like
    Monitor Size like 15 or 17 or 21inchs
    Monitor Type like Flat or LCD Type
    I have created the Set type for that.
    I have assigned those things to Product.
    What are the tables are involved in this process can anybody help me out regarding this?
    Thanks

  • Help in using record type and object type

    Hi Experts,
    I am new to object types and record types.
    I want to return the output of this query using one OUT parameter
    from the procedure using RECORD type or OBJECT type.
    with out using refcursor.
    SELECT empno,ename,sal FROM emp WHERE deptno=30;
    Let us assume the query is returning 50 records.
    I want to send those 50 records to OUT parameter using record type or object type.
    Please provide the for the requirement code using RECORD TYPE and OBJECT TYPE separately.
    Your earliest response is appreciated.
    Thanks in advance.

    Hi All,
    I have tried this.But it ising not work
    CREATE OR REPLACE PACKAGE maultiplevalues_pkg
    IS
    TYPE t_record IS RECORD
    (empno emp.empno%TYPE,
    ename emp.ename%TYPE,
    sal emp.sal%TYPE);
    V_RECORD t_record;
    TYPE t_type IS TABLE OF V_RECORD%TYPE;
    PROCEDURE maultiplevalues_pROC(p_deptno IN emp.deptno%TYPE,
    dept_result OUT t_type);
    END;
    CREATE OR REPLACE PACKAGE body maultiplevalues_pkg
    IS
    PROCEDURE maultiplevalues_pROC(p_deptno IN emp.deptno%TYPE,
    dept_result OUT t_type)
    is
    begin
    dept_result :=t_type();
    for I in(
    select EMPNO,ENAME,SAL from EMP WHERE deptno=p_deptno
    LOOP
    dept_result.extend;
    dept_result(i).empno :=i.empno;
    dept_result(i).ename :=i.ename;
    dept_result(i).sal :=i.sal;
    END LOOP;
    END;
    END;
    Please help me OUT return multiple values through single OUT variable in a procedure.
    Thanks.

  • Varray, Nested Table and Object types in OWB r2

    Requirement:
    Flat file with repeating groups of nested content need to move into Object Relational ORACLE table (using varray or nested tables - no preference). The data will be loaded, then mapped/transformed into a richer O-R output to directly produce XML outputs.
    Problem:
    Generated PL/SQL "seems" to do the correct thing, but deployment errors show failures on mapping of collections (varrays, NTs or OTs) and in sqlplus recompiling the PKB still gives the errors. Is this a PL/SQL generator error, or is there a more meaningful example of using CONSTRUCT OBJECT operator than the embedded odcumentation - it is a simple type (single instance) and not a variable repeating group of nested data.
    Anyone had any success with these, or know of any collateral to assist in the process. Thanks.

    The process we are following is very simple. We are talking 10 columns from a source flat file table and wish to map this into a Varray/Nested table, with one column of Varchar2(10).
    When you create your map in OWB, select the construct object, you have to choose an object type - it does not allow you to select a VARAAY or NESTED table.
    I have then created an object defined in the same structure as the VARRAY/NESTED table - I have then made the VARRAY/NESTED table of this TYPE.
    Example:
    CREATE OR REPLACE TYPE "O_REL_PUB_INDEX" AS OBJECT (
    X_REL_PUB_INDEX_1 VARCHAR2(10))
    CREATE OR REPLACE TYPE "V_REL_PUB_INDEX" AS VARRAY(15) OF O_REL_PUB_INDEX
    In OWB you can then select O_REL_PUB_INDEX when creating the 'Contruct Object'.
    The problem I have is that when I map to my target column of type V_REL_PUB_INDEX and DEPLOY my map I get the following errors taken from OWB control centre
    Name
    Action
    Status
    Log
    TEST
    Create
    Warning
    ORA-06550: line 2931, column 9:
    PL/SQL: SQL Statement ignored
    TEST
    Create
    Warning
    ORA-06550: line 3174, column 11:
    PL/SQL: ORA-00932: inconsistent datatypes: expected OWB_USER.O_REL_PUB_INDEX got OWB_USER.V_REL_PUB_INDEX
    TEST
    Create
    Warning
    ORA-06550: line 401, column 7:
    PL/SQL: SQL Statement ignored
    TEST
    Create
    Warning
    ORA-06550: line 643, column 13:
    PL/SQL: ORA-00932: inconsistent datatypes: expected OWB_USER.O_REL_PUB_INDEX got OWB_USER.V_REL_PUB_INDEX
    TEST
    Create
    Warning
    ORA-06550: line 7221, column 9:
    PL/SQL: SQL Statement ignored
    TEST
    Create
    Warning
    ORA-06550: line 7464, column 11:
    PL/SQL: ORA-00932: inconsistent datatypes: expected OWB_USER.O_REL_PUB_INDEX got OWB_USER.V_REL_PUB_INDEX
    Any ideas? anyone succesfully mapped to either a VARRAY or an NESTED TABLE target column?

  • Type attribute with Object type or Nested table?

    I have been creating lot many threads around the same problem, however i thought i knew but realized I do not know or else do not know how to..
    I have created object type with an attribute READINGVALUE NUMBER(21,6)...How can i use type attribute on this object while declaring variable.....can we use type attribute on NESTED TABLES, similar to the db tables?
    example
    CREATE TYPE READING AS OBJECT(READINGVALUE NUMBER(21,6));
    CREATE TABLE INTERVALREADINGS OF TYPE READING;

    meghavee wrote:
    Thanks Solomon, however this approach does not preserve precision/scale of number data type.....What you can do is create placeholder tables:
    SQL> create table reading_type_placeholder of reading
      2  /
    Table created.
    SQL> desc reading_type_placeholder
    Name                                      Null?    Type
    READINGVALUE                                       NUMBER(21,6)
    SQL> declare
      2      v_var reading_type_placeholder.readingvalue%type;
      3  begin
      4      v_var := 123456789012345;
      5  end;
      6  /
    PL/SQL procedure successfully completed.
    SQL> declare
      2      v_var reading_type_placeholder.readingvalue%type;
      3  begin
      4      v_var := 1234567890123456;
      5  end;
      6  /
    declare
    ERROR at line 1:
    ORA-06502: PL/SQL: numeric or value error: number precision too large
    ORA-06512: at line 4
    SQL>And if you modify type attribute:
    SQL> alter type reading modify attribute readingvalue number(26,6) cascade;
    Type altered.
    SQL> desc reading_type_placeholder
    Name                                      Null?    Type
    READINGVALUE                                       NUMBER(26,6)
    SQL>SY.

  • XML Parser and Content-type/encoding problem

    I've write a little and simple XML parser and a simple "trasformer" that recive an XML file and an XSL one and return HTML, here is the code:
    public static String toHTML(Document doc, String xslSource){
            ByteArrayOutputStream testo = new ByteArrayOutputStream();
            try{
                DOMSource source = new DOMSource(doc);
                TransformerFactory tFactory = TransformerFactory.newInstance();
                System.out.println("----> " + xslSource);
                Transformer transformer = tFactory.newTransformer(new StreamSource(xslSource));
                transformer.setOutputProperty(OutputKeys.INDENT, "yes");
                transformer.setOutputProperty("{http://xml.apache.org/xslt}indent-amount", "2");
                transformer.setOutputProperty(OutputKeys.METHOD, "html");
             transformer.setOutputProperty(OutputKeys.OMIT_XML_DECLARATION, "yes");
             transformer.setOutputProperty(OutputKeys.ENCODING, "UTF-8");
                transformer.transform(source, new StreamResult(testo));
            }catch(Exception ioe){
                System.out.println("2 XMLTool.toHTML " + new java.util.Date());
                System.out.println(ioe);        
            return testo.toString();
        }the problem is that I would like to put the HTML code its return into a JEditorPane; now I'm trying with this code:
    JEditorPane jep1 = new JEditorPane();
    jep1.setContentType("text/html");
    jep1.setText(v);
    // 'v' is the string returned by the code posted up (the XML/XSL transformer)but I can't see anything in my JEditorPane.
    I think that the problem is this line of code that the transformer add automaticaly ad HTML code:
    <META http-equiv="Content-Type" content="text/html; charset=UTF-8">Infact if I try to delete this line from the code I can see what I want but is'n good delete a line of code without understend where is the problem.
    So, can anyone help me?

    good.
    when u set ur output properties to html , transformer
    searches for all entity references and converts accordingly.
    if u r using xalan these files will be used for conversion of
    Character entity references for markup-significant
    output_html.properties
    (this should be in templates package)
    and HTMLEntities.res(should be in serialize package)
    vasanth-ct

  • Remove XML attribute and value

    Hi All,
    I require to delete the attribute and value in xml structure.
    Below code is not working due to ":" (aid:cstyle) between attribute name.
    JS code is:
    evaluateXPathExpression("//typestyle[@aid:cstyle = 'bold']")
    If I remove colon and change it to aidcstyle than it is working. How to read : (colon)?
    Also it is showing alert message again and again.
    Please help.
    Chang.

    for the first problem there are two fixes:
    first one (simple, normal, no ideea why it's not there already) declare your aid (and aid5) namespaces in your xml. For example:
    <Root xmlns:aid=”http://ns.adobe.com/AdobeInDesign/4.0/”
    xmlns:aid5=”http://ns.adobe.com/AdobeInDesign/5.0/”>
    second one: more advanced xpath, if it works, using local_name() and namespace-uri(). My xpath-expert is not at work right now, so i can't help you more with this until he's back.
    second problem... no real fix for now. some characters that indesign uses (indentToHere and rightIndentTab, as far as I know, but may be others too) have no UTF equivalent, so you get that warning. you can eitehr ignore it, or, as I do, before doing anything with XML in scripting, i change the said characters to some marking (##RIT## and ##ITH##), and change them back after changing the XML

  • Datagrid - XML attributes and text

    Please help with this. I am trying to load XML data into
    datagrid. If I use only text nodes or attributes, I can get it
    work. But if I have mixed XML content, I cannot get data I need.
    All examples I've found so far use or just attributes or just
    nodes. No mixed content.
    <myDatas>
    <data id="1">
    <name nickname="jay"> JACK</name>
    </data>
    How to show all data in datagrid using HTTP service in
    FlexBuilder?
    <mx:DataGridColumn headerText="PROJEKT"
    dataField="@id"/>
    <mx:DataGridColumn headerText="ID" dataField="NAME"/>
    <mx:DataGridColumn headerText="PONUDA"
    dataField="@nickame"/>
    This example shows just first two of them. I cannot get
    nickname shown nut even using labelFunction. Also, I have more
    complexed XML than this.
    Please help & thank you.

    Sorry for the typos Tracy. I've tryed to make it short and
    clear to understand the problem. Here is (I hope) more litterate
    version :)
    xmlFile:
    <myDatas>
    <DATA id="1">
    <NAME nick="jay">JACK</NAME>
    <SURNAME middle="what">JILL</SURNAME>
    </DATA>
    <DATA />
    </myDatas>
    part of mxml file
    <mx:HTTPService
    id="dataFeed"
    url="
    http://localhost/data.xml"
    useProxy="false"
    />
    <mx:Script>
    <![CDATA[
    private function getAttributeNick(item:Object,
    column:DataGridColumn):String
    return (item["NAME"]["nick"]);
    <!-- I cannot make this work but you'll get idea -->
    private function getAttributeUniversal(item:Object,
    column:DataGridColumn):String
    return (this["item."+ column.dataField]);
    ]]>
    </mx:Script>
    <mx:DataGrid
    dataProvider="{dataFeed.lastResult.myDatas.DATA}" >
    <mx:columns>
    <mx:DataGridColumn headerText="ID" dataField="@id"/>
    <mx:DataGridColumn headerText="NAME"
    dataField="NAME"/>
    <mx:DataGridColumn headerText="SURNAME"
    dataField="SURNAME"/>
    <-- this I cannot get to work -->
    <mx:DataGridColumn headerText="NICKNAME-!OK"
    dataField="NAME.@nick"/>
    <mx:DataGridColumn headerText="SUR2-!OK"
    dataField="SURNAME.@middle"/>
    <!-- this works but I would like not to write function
    for each attribute I may have -->
    <mx:DataGridColumn headerText="NICKNAME-OK"
    labelFunction="getAttributeNick"/>
    <!-- so I try to send in some data -->
    <mx:DataGridColumn headerText="SUR2 !OK"
    dataField="SURNAME.@middle"
    labelFunction="getAttributeUniversal"/>
    </mx:columns>
    </mx:DataGrid>
    Thank you for your interest.

  • 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

  • Load form in xml format and resource type of .xml file is set to Embedded

    Getting Error in the Bold statements and again while it throws exception the catch statement is getting error
    oGlobalMain is the object of global class where every object is created and function is defined
    SBO_Application is declared as  Public WithEvents SBO_Application As SAPbouiCOM.Application
    #Region "Load as XML"
        Public Sub LoadAsXml(ByVal FileName As String, Optional ByVal FileType As ResourceType = ResourceType.Content)
            Dim oXmlDoc As Xml.XmlDocument
            Dim oXmlStream As System.IO.Stream
            oXmlDoc = New Xml.XmlDocument
            Try
                If FileType = ResourceType.Content Then
                    oXmlDoc.Load(FileName)
                Else
                    oXmlStream = System.Reflection.Assembly.LoadFrom(System.Windows.Forms.Application.ExecutablePath).GetManifestResourceStream(GetType(modStartUp).Namespace & "." & FileName)
                    oXmlDoc.Load(oXmlStream)
                End If
                oGlobalMain.SBO_Application.LoadBatchActions(oXmlDoc.InnerXml)
            Catch ex As Exception
                oGlobalMain.SBO_Application.MessageBox(ex.Message)
            End Try
        End Sub
    #End Region
    please send me some suggestion, I would be grateful to you.
    Thanks in advance
    regards
    Nandini

    Have you set oCompany.XmlAsString = true?
    Otherwise it is expecting an XML file location and not a string.

  • Adding XML Declaration and Document Type Declaration.

    I'm using Oracle's XML Class Generator C++ version 1.0.2.0.0. I can create classes from a defined external DTD and create my XML document. But the document does not contain the XML Declaration <?xml version='1.0?> nor does it contain the Document Type Declaration <!DOCTYPE root-element-name SYSTEM "system-identifier">. What do I need to do to get these as part of my XML document? Does the class generator have methods to do this? Could someone show me an example?

    If you invoke the print method on the top-level ELEMENT, you get
    just the body of the document with no DTD or XMLDecl. if you invoke
    print on the top level NODE (the DOCUMENT node), then the output
    document will contain the XMLDecl and DTD.
    So please try to print from DOCUMENT node.

  • XML Publisher and the type formula

    Hi,
    I am trying to develop an XML Publisher template for the Ebusiness Suit's Accounts Receivable RAXINV report. I have noticed that in the XML I generated running the report as type XML. It generates the XML tags but they contain no data for the column type formula. Can anyone recommend a way of getting around this?
    Regards,
    Mark

    Hi Tim,
    Thanks for you reply. Yes the XML Tags had been set for the formula columns.
    Could you tell me in Oracle Report in the Data Model, if a column of type of formula has a PL/SQL formula that returns a result will that result be displayed when the report is exported as XML?
    Thanks,
    Mark

  • Ui configuration at run time using role config key and object type

    Hi experts,
    Let me start by admitting that I am very new to the crm webui. I have a requirement in which I need to create a few z business roles and unique role config keys for them. And I have been given some requirements like below.
    - Access to Account, Service Request, Knowledge Article and FACT sheet data
    - Able to display all service requests.
    below is the processing logic that I have been told.
    Using the role config key, different view configurations would be created for respective components in
    the component workbench.
    Based on the business role, respective role config key would be picked up and the corresponding
    view would be displayed on UI.
    In addition to this, in the IMPL class of the component work bench, DO_CONFIG_DETERMINATION
    method could also be used to specify which role config should be picked up.
    Do they mean that using same role config key, I need to create more than one UI configuration? I was also told by some one that I need to create the configuration according to ui objects and sub object and then inside the  DO_CONFIG_DETERMINATION methode, I can check the role config key and hard code the ui object and the sub object. But I do not know how to create them.
    Could anyone tell me from where I can start and how to achieve this task?
    I apologize if my question is very basic.

    Do they mean that using same role config key, I need to create more than one UI configuration? I was also told by some one that I need to create the configuration according to ui objects and sub object and then inside the DO_CONFIG_DETERMINATION methode, I can check the role config key and hard code the ui object and the sub object. But I do not know how to create them.
    Could anyone tell me from where I can start and how to achieve this task?
    I apologize if my question is very basic.
    You can do the following
    a) Go to the view you want to create a new configuration.
    b) Choose 'Copy Configuration' .
    c) There you would be asked to enter the Role Config Keys , Object Name & Sub Object Name. You can choose your own names for Object Names & Sub Object Name.
    d) go to DO_CONFIG_DETERMINATION. There based on your logic you can load the configurations this way
            IF (your_condition) EQ abap_true.
              CALL METHOD me->set_config_keys
                EXPORTING
                  iv_object_type          = 'your_object_type'
                  iv_object_sub_type      = 'your_sub_obj_type'
                  iv_propagate_2_children = abap_false.
    Regards
    Kavindra

  • 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.

Maybe you are looking for