ORA-00902 on trying to Select a Nested Table

I have created a Table having Nested Table as below:
create type INT_ARRAY as table of INTEGER;
create table test1 (
id number not null,
name varchar2(500),
prot_NT int_array,
constraint test1_pk primary key(id))
STORAGE (INITIAL 512K
NEXT 512K
MINEXTENTS 1
MAXEXTENTS UNLIMITED
PCTINCREASE 0)
nested table prot_NT store as prot_NT_TAB ;
And I am doing following select using an executeQuery on a PreparedStatement (I am not using any oracle extensions. I am using JDK1.2.2 on Solaris with Weblogic 5.1 appServer. jdbc driver is oracle.jdbc.driver.OracleDriver version 8.1.6.0.0):
Select id, name, prot_nt from test1
Some times this executeQuery works fine. But some times I get SQLException with "ORA-00902: invalid datatype". Same tables and same query behaves differently at different times.
Is there any problem with this usage?? Is there any known problem? I am trying to get Nested Table to a int[]. What is recommended procedure for doing this? Please help me out! Thanks in advance!

By this point you've probably either solved the problem, or just dropped the database, but for anyone else interested, here's something you can do.
You can drop the queue table by setting event 10851 with the following steps:
1. Log into SQL*Plus or Server Manager as a user with DBA privileges.
2. Issue command: alter session set events '10851 trace name context forever, level 2'; Statement Processed.
3. Drop table <queue_table>; Statement Processed.
Solution Explanation: =====================
Event 10851 disables error 24005 when attempting to manually drop a queue table. It should be noted that this is the "Hard Way" of dropping queue tables, and should only be practiced after all formal procedures, i.e., using the "DBMS_AQADM.DROP_QUEUE_TABLE" procedure, has failed to drop the table.
Cheers,
Doug

Similar Messages

  • Select from nested table in a nested table security problem

    please help
    running Oracle 9.2.0.3.0 on RH AS 2.1
    I can select the inner most nested table as the creator, but can't use the same select statement as USER2.
    ORA-00942: table or view does not exist
    -- begin make of objects and tables
    create or replace type mydata_t as object ( x float, y float);
    create or replace type mydata_tab_t as table of mydata_t;
    create or replace type mid_t as object (
         graphname varchar2(12),
         datapoints mydata_tab_t );
    create or replace type mid_tab_t as table of mid_t;
    create or replace type top_t as object (
         someinfo int,
         more_mid     mid_tab_t );
    create table xyz (
         xyzPK int,
         mainstuff     top_t )
         nested table mainstuff.more_mid store as mid_nt_tab
              (nested table datapoints store as mydata_nt_tab)
    -- grants
    grant all on mydata_t to user2;
    grant all on mydata_tab_t to user2;
    grant all on mid_t to user2;
    grant all on mid_tab_t to user2;
    grant all on top_t to user2;
    grant all on xyz to user2;
    -- insert
    insert into xyz values (1, top_t(22,mid_tab_t(mid_t('line1',mydata_tab_t(
    mydata_t(0,0),
    mydata_t(15,15),
    mydata_t(30,30))))));
    commit;
    -- select fails as user2
    select * from table(select Y.datapoints as DP_TAB
         from table(select X.mainstuff.more_mid as MORE_TAB
              from scott.xyz X
              where X.xyzPK=1) Y
         where Y.graphname='line1') Z;
    -- select works as user2, but i need individual lines
    select Y.datapoints as DP_TAB
         from table(select X.mainstuff.more_mid as MORE_TAB
              from scott.xyz X
              where X.xyzPK=1) Y
         where Y.graphname='line1';

    Thank you for your reply.
    I have tried
    select value(t) from table t;
    but it is still not working. I got almost the same answer as before.
    Anyway thank you very much again.
    <BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by MARCELO OCHOA ([email protected]):
    Originally posted by meimei wu ([email protected]):
    [b]I created a nested object-relational table using REF type in oracle8i. when I tried to select * from the table, I got lots of number as the ref type values, but actually, the value in ref type should be of type varchar2 and number. The number I got looked like following code:
    JARTICLE_REF_TYPE(000022020876108427C2FE0D00E0340800208FD71F76103B99B12009C0E0340800208FD71F,
    Does anyone know how I can get the actual value that I inserted into the nested table?
    your help is appreciated.<HR></BLOCKQUOTE>
    Try this:
    select value(t) from table t;
    Best regards, Marcelo.
    null

  • ORA-22895 when scope target is a nested table

    Hi,
    DB version : 11.2.0.2
    Test case :
    create or replace type ChartPoint as object ( refId integer, val   number );
    create or replace type ChartPointSet is table of ChartPoint;
    create or replace type ChartPointRefSet is table of ref ChartPoint;
    create or replace type ChartDimension as object ( id integer, name varchar2(30), points  ChartPointRefSet);
    create or replace type ChartDimensionSet is table of ChartDimension;
    create or replace type ChartEntry as object (points  ChartPointSet);
    create or replace type ChartEntrySet is table of ChartEntry;
    create or replace type ChartObject as object (
      id         integer
    , name       varchar2(30)
    , dimensions ChartDimensionSet
    , entries    ChartEntrySet
    create table chart_table of ChartObject
      nested table dimensions store as chart$dimension_set
        nested table points store as chart$dimension_point_set
    , nested table entries store as chart$entry_set
        nested table points store as chart$entry_point_set
    alter table chart$dimension_point_set add (scope for (column_value) is chart$entry_point_set);I'm trying to scope a REF column in a nested table to an object (ChartPoint) whose instances are stored in another nested table (CHART$ENTRY_POINT_SET), but the ALTER DDL is giving :
    ORA-22895: referenced table "CHART$ENTRY_POINT_SET" in schema "<SCHEMA>" is not an object tableI know this works when the scope target is a top-level object table, but apparently a nested object table is not recognized as a valid target.
    I didn't find anything related to this in the Object-Relational Dev Guide.
    Any ideas?
    Thanks.

    gaverill wrote:
    Correct, object references (REFs) can only refer to row objects, not nested column objects.Well, I'm not trying to reference a column object.
    Technically speaking, the target table (CHART$ENTRY_POINT_SET) is an object table (albeit a nested table), isn't it?
    SQL> select object_id_type, table_type
      2  from user_object_tables
      3  where table_name = 'CHART$ENTRY_POINT_SET';
    OBJECT_ID_TYPE   TABLE_TYPE
    SYSTEM GENERATED CHARTPOINT
    However, there doesn't seem to have any "SYS_NC_OID$" column, so I guess you're right :
    SQL> select column_name, data_type
      2  from user_nested_table_cols
      3  where table_name = 'CHART$ENTRY_POINT_SET';
    COLUMN_NAME                    DATA_TYPE
    NESTED_TABLE_ID                RAW
    SYS_NC_ROWINFO$                CHARTPOINT
    REFID                          NUMBER
    VAL                            NUMBER

  • Error while selecting  from nested table in PL/SQL block ............

    SQL> create type string_table is table of varchar(100);
    2 /
    Type created.
    declare
    v_names string_table := string_table();
    begin
    v_names.EXTEND(3);
    v_names(1) := 'name1';
    v_names(2) := 'name2';
    v_names(3) := 'name3';
    dbms_output.put_line(v_names(1));
    dbms_output.put_line(v_names(2));
    dbms_output.put_line(v_names(3));
    dbms_output.put_line(v_names.COUNT());
    select * from table(v_names);
    end;
    select * from table(v_names);
    ERROR at line 12:
    ORA-06550: line 12, column 7:
    PLS-00428: an INTO clause is expected in this SELECT statement

    select * from table(v_names);
    I guess ,here you were trying to put the content of the NT into another NT, or just trying to print it.
    But, I don't think INTO Clause is mandatory here.
    Please check your modified code (w/o INTO) and the output :
    DECLARE
       TYPE string_table IS TABLE OF VARCHAR (100);
       v_names   string_table := string_table ();
       v_test    string_table := string_table ();
    BEGIN
       v_names.EXTEND (3);
       v_names (1) := 'name1';
       v_names (2) := 'name2';
       v_names (3) := 'name3';
       DBMS_OUTPUT.put_line ('Old collection - '||v_names (1));
       DBMS_OUTPUT.put_line ('Old collection - '||v_names (2));
       DBMS_OUTPUT.put_line ('Old collection - '||v_names (3));
       DBMS_OUTPUT.put_line ('Old collection - '||v_names.COUNT ());
       DBMS_OUTPUT.put_line (CHR(10));
       /* SELECT * FROM TABLE (v_names); */
       v_test := v_names;
       DBMS_OUTPUT.put_line ('New collection -- '||v_test (1));
       DBMS_OUTPUT.put_line ('New collection -- '||v_test (2));
       DBMS_OUTPUT.put_line ('New collection -- '||v_test (3));
       DBMS_OUTPUT.put_line ('New collection -- '||v_test.COUNT ());
       DBMS_OUTPUT.put_line (CHR(10));
       /* Printing using FOR LOOP */
       FOR i IN v_test.FIRST..v_test.LAST
       LOOP
         DBMS_OUTPUT.put_line ('In FOR Loop --- '||v_test (i));
       END LOOP;
    EXCEPTION
       WHEN OTHERS
       THEN
          DBMS_OUTPUT.put_line ('Error ' ||SQLERRM|| DBMS_UTILITY.format_error_backtrace);
    END;gives o/p :
    Old collection - name1
    Old collection - name2
    Old collection - name3
    Old collection - 3
    New collection -- name1
    New collection -- name2
    New collection -- name3
    New collection -- 3
    In FOR Loop --- name1
    In FOR Loop --- name2
    In FOR Loop --- name3Refer this link -- http://docs.oracle.com/cd/E11882_01/appdev.112/e17126/tuning.htm#CIHGGBGF
    Edited by: ranit B on Dec 26, 2012 2:29 PM
    -- code modified
    Edited by: ranit B on Dec 26, 2012 2:45 PM
    -- code 'again' updated -- FOR LOOP added

  • [solved] trying to select on a table type

    Hello I am trying to shift data from one schema to another, but while I am shifting it I also want to perform a consolidation on it.
    My SQL looks like
    declare
    cursor basedata_cur is
    select cost_centre_id, mm.new_expid expense_type_id, period_id, year_,
    data_type_id, measure_id,sum(value) value from basedata_normprd BDN
    inner join migrationmap MM on mm.orig_expid=bdn.expense_type_id
    group by bdn.cost_centre_id, mm.new_expid, bdn.year_, bdn.period_id, bdn.data_type_id,
    bdn.measure_id;
    type basedata_rec_type is table of basedata_cur%ROWTYPE index by PLS_INTEGER;
    basedata_rec basedata_rec_type;
    loop_cntr INTEGER;
    seq_val integer;
    i integer;
    begin
    loop_cntr := 0;
    execute immediate 'truncate table normuat.basedata';
    execute immediate 'alter index normuat.cost_centre_id_1 unusable';
    execute immediate 'alter index normuat.year__1 unusable';
    execute immediate 'alter index normuat.period_id_1 unusable';
    execute immediate 'alter index normuat.measure_id_3 unusable';
    execute immediate 'alter index normuat.expense_type_id unusable';
    reset_sequence('S_4544_1_BASEDATA',1);
    open basedata_cur;
    loop
    fetch basedata_cur bulk collect into basedata_rec LIMIT 10000;
    exit when basedata_rec.count is null;
    for i in 1..basedata_rec.count
    loop
    insert into normuat.basedata(cost_centre_id, expense_type_id, period_id, year_,
    data_type_id, measure_id, value )
    values(basedata_rec(i).cost_centre_id, basedata_rec(i).expense_type_id, basedata_rec(i).period_id,
    basedata_rec(i).year_, basedata_rec(i).data_type_id, basedata_rec(i).measure_id, basedata_rec(i).value);
    loop_cntr := loop_cntr +1;
    end loop;
    commit;
    END LOOP;
    close basedata_cur;
    commit; --commit any left-over
    execute immediate 'alter index normuat.cost_centre_id_1 rebuild';
    execute immediate 'alter index normuat.year__1 rebuild';
    execute immediate 'alter index normuat.period_id_1 rebuild';
    execute immediate 'alter index normuat.measure_id_3 rebuild';
    execute immediate 'alter index normuat.expense_type_id rebuild';
    end;
    Can I replace the for loop. looping over the table collection and instead replace with a select to dump the data all in one single shot.
    I'm doing it this way because the database is a bit short of space and I don't want to bust the redo/undo and archiver space on the database.
    I tried
    Select cost_centre_id, expense_type_id, period_id, year_,
    data_type_id, measure_id, value from table(basedata_rec);
    but I get an error about accessing rows from a nested table.
    Can anyone suggest a solution. or maybe a better way to do this.
    Message was edited by:
    user508507
    Message was edited by:
    user508507

    Looks like FORALL should help here.
    More info in this article if you're not on 11g:
    http://www.oracle-developer.net/display.php?id=410
    Message was edited by:
    William Robertson

  • Select from nested table

    Hi,
    I create following types and table:
    CREATE OR REPLACE TYPE obj_query AS OBJECT
    (emp_id NUMBER(6)
    ,emp_first VARCHAR2(20)
    ,emp_last VARCHAR2(25));
    CREATE OR REPLACE TYPE tab_query AS TABLE OF obj_query;
    CREATE TABLE queryEmp
    (id_row NUMBER
    ,beginTrans VARCHAR2(15)
    ,queryA VARCHAR2(100)
    ,resultEmp tab_query)
    NESTED TABLE resultEmp
    STORE AS nested_queryEmp;
    I would like the output of the table queryEmp like this:
    id_row beginTrans queryA emp_id emp_first emp_last
    1 15:00 Select1 100 Joe King
    101 John Queen
    2 15:10 Select2 100 Leo King
    101 Mett Queen
    But Can I get this result with only SQL SELECT statement from this table?
    I don't want to use PL/SQL, only SELECT in SQL*Plus.
    Thank you
    I'm sorry but output looks so bad.
    So, I want to get the one row of id_row, beginTrans, queryA and all rows of nested table dmlStats to this "main" row and so on.
    But not in PL/SQL
    I hope, you understand me.
    Thanks
    Edited by: user9357436 on 2.11.2011 5:18
    Edited by: user9357436 on 2.11.2011 5:25

    Arvind Ayengar wrote:
    Can you please explain things in details, and just ensure you are in the correct forum.Is this reply directed at me or the OP?

  • HOw to improve insert/update/select  for nested table.

    Hi All,
    I think this is my second thread for nested table.
    i just want to know what are the different ways available to improve the insert/update/select operation on Nested table.
    Thanks in advance.

    By not using a nested table for data storage in the first place...
    http://asktom.oracle.com/pls/apex/f?p=100:11:0::::P11_QUESTION_ID:8135488196597
    Perhaps Parallel Query/DML might give some relief.

  • Value select from nested table

    CREATE TYPE test AS OBJECT (
    test1 varchar2(10),
    test2 varchar2(10));
    create or replace type test2 as table of test;
    two record are there within object type.then how i will select value from nested table.

    How many times are you going to ask this question before you either look at the response I have given to Re: how i will display type like (nestedtable or varrays or pl/sql table).?
    You have posted often enough to this forum to know the ettiquette by now.
    Regards, APC

  • SQL Select into Nested Table

    Hi,
    I would like to be able to store results of a query in the database. So far, I believe the best method is to store it as a nested table so that I may refer to it by criteria (e.g. date, name, etc.). I am somewhat new to Oracle and I'm not sure how to do this.
    The query will always return the same columns, so that should make it easier for me. Also, I need to be able to query the data that is stored into an APEX report region.
    Can someone tell me if this is the best method to do this? Also, is there a tutorial anywhere that explains how to do what I want?
    Thanks in advance,
    -David

    would like to be able to store results of a query in the database. So far,
    I believe the best method is to store it as a nested table so that I may refer
    to it by criteria (e.g. date, name, etc.). I am somewhat new to Oracle and
    I'm not sure how to do this.Given that you're new to Oracle how did you decide the best approach was a nested table? As most people who know anything at all about Oracle would take the opposite view (as Dan has done).
    Let's drill down into your requirements some more. How long do what to retain the results for? Do you want to retain the results of many queries? If so, will these queries be the same shape (same number and type of columns) or will they be different? Do you want one user to be able to see the results of another user's queries? Do you want to associate metadata with these result sets?
    In fact, why do you want to be able to store these result sets at all? Oracle is actually pretty good at caching data, especially in 11g. So you may be re-inventing a wheel and designing it wonky at that.
    Cheers, APC
    Blog : http://radiofreetooting.blogspot.com/

  • Ora-07445 When tried to select a view using where clause it got disconnectd

    select * from v_my_view;
    plan group_name plan_id
    plan_one group_one 101
    1 row selected.
    when I tried
    select * from v_my_view where plan_id='101';
    It got disconnected and show to end of communication error
    Current verson of database I am working with is 10.2.0.1.0
    Please help, niether i have metalink access nor I have any patch to install.
    Thanks and Regards in advance,

    First don't create Multiple thread I guess you created 3 thread for the same problem.
    Coming back to your problem did you check your Alert log, is your server running in shared/Dedicated mode whats your OS.

  • Error ORA-02375 while trying to export/import JTF.JTF_PF_REPOSITORY table

    We have already created an SR, In the mean time, trying to see whether anyone else has come across this issue.  Thanks.
    On : 11.2.0.3 version, Data Pump Import
    Error ORA-02375 while trying to import JTF.JTF_PF_REPOSITORY table
    We are getting the below error while performing the full db
    import.
    ORA-02375: conversion error loading table
    "JTF"."JTF_PF_REPOSITORY" partition "EBIZ"
    ORA-22337: the type of accessed
    object has been evolved
    ORA-02372: data for row: SYS_NC00040$ :
    0X'8801FE000004AD0313FFFF0009198401190A434F4E4E454354'
    This issue is
    stopping our upgrade of database from 10.2.0.4 to 11.2.0.3. This is very
    critical for us to be resolved.

    Hi,
    seems this is Character set issue fo source and Target DB check this doc:Unable to Export Table WF_ITEM_ATTRIBUTE_VALUES due to errors ORA-02374, ORA-22337, and ORA-02372 (Doc ID 1522761.1)
    HTH

  • Error while create trigger on for nested table

    I want to insert a record into a nested table.For this, I created a view for the table, which includes the nested table.It told me ORA-25015 cannot perform DML on this nested table view column.So I created a trigger for the nested table.However, it told me that ORA-25010 Invalid nested table column name in nested table clause.I think my nested table is valid, i don't konw why did it appear this kind of problem?
    My table is
    CREATE TABLE ENT
    ID NUMBER(7) NOT NULL,
    CREATE_DATE VARCHAR2(11 BYTE),
    UPDATE_DATE VARCHAR2(11 BYTE),
    DEPTS VARRAY_DEPT_SEQ
    CREATE OR REPLACE
    TYPE DEPT AS OBJECT
    ID NUMBER(8),
    ANCHOR VARCHAR2(20),
    CREATE OR REPLACE
    TYPE " VARRAY_DEPT_SEQ" as varray(930) of DEPT
    CREATE OR REPLACE VIEW ENT_NESTED_VIEW
    (ID, CREATE_DATE, UPDATE_DATE, DEPTS)
    AS
    select e.ID,cast(multiset(select r.id,r.anchor from ent z, table(z.depts) r where z.ID=e.ID )as varray_dept_seq)
    FROM ENT e
    Then when I created trigger;
    CREATE OR REPLACE TRIGGER EMP.ENT_NESTED_TRI
    INSTEAD OF INSERT
    ON NESTED TABLE DEPTS OF EMP.ENT_NESTED_VIEW
    REFERENCING NEW AS New OLD AS Old PARENT AS Parent
    FOR EACH ROW
    BEGIN
    END ;
    I met the problem: ORA-25010 Invalid nested table column name in nested table clause
    Could you please tell me the reason
    Thank you!
    My insert SQL is:
    insert into table(select depts from ent_nested_view where id=1856) values(varray_dept_seq(dept(255687,'AF58743')))
    Message was edited by:
    user589751

    Hi,TongucY
    Compared with the "Referencing Clause with Nested Tables" part of this reference -
    http://psoug.org/reference/instead_of_trigger.html, I found the answer of this
    quesion. That is "CREATE OR REPLACE TYPE " VARRAY_DEPT_SEQ" as[b] varray(930) of
    DEPT". It turns to be a varying array, not a nested table. It should be "CREATE OR
    REPLACE TYPE " VARRAY_DEPT_SEQ" as table of DEPT". That is OK. Thank you very
    much!
    While there is an another question, if I create a varying array like" CREATE OR
    REPLACE TYPE " VARRAY_DEPT_SEQ" as[b] varray(930) of DEPT " and I want to insert
    a record into the varying array, which the record has been existed.The method that
    create a view and a trigger seems not to be effective.
    For instance,
    There is a record in the table
    ID:1020
    CREATE_DATE:2005-10-20
    UPDATE_DATE:2007-2-11
    DETPS: ((10225,AMY))
    I want to ask this record to be
    ID:1020
    CREATE_DATE:2005-10-20
    UPDATE_DATE:2007-2-11
    DETPS: ((10225,AMY),(10558,TOM))
    How should I do?
    Could you please help me?
    Best regards.
    Message was edited by:
    user589751

  • Elements order in Nested Tables

    In PL/SQL when I am adding element to a nested table of objects one by one(in order), and then trying to insert that nested table type to a physical table , the order of element changes. how can I prevent this behavior?

    Your example is incomplete and has errors. Oracle does not guarantee the order of anything unless you use an order by clause. So, if you expect the following to produce rows in some order:
    Open cur1 for select * from another_table;
    then you need to add an order by clause, such as:
    Open cur1 for select * from another_table order by id;
    The following does minimal correction, completion, and provides sample data to demonstrate:
    SCOTT@orcl_11gR2> create or replace TYPE coord AS OBJECT
      2    (id  number,
      3       x   number,
      4       y   number);
      5  /
    Type created.
    SCOTT@orcl_11gR2> create or replace TYPE coord_tab AS TABLE OF coord;
      2  /
    Type created.
    SCOTT@orcl_11gR2> create table demo_table
      2    (id     number,
      3       coords     coord_tab)
      4  NESTED TABLE coords STORE AS coords_tabb
      5  /
    Table created.
    SCOTT@orcl_11gR2> create table another_table
      2    (id  number,
      3       x   number,
      4       y   number)
      5  /
    Table created.
    SCOTT@orcl_11gR2> insert into another_table values (10, 20, 30)
      2  /
    1 row created.
    SCOTT@orcl_11gR2> insert into another_table values (60, 50, 40)
      2  /
    1 row created.
    SCOTT@orcl_11gR2> DECLARE
      2    type cur is ref cursor;
      3    cur1 cur;
      4    type rec_type is record
      5        (id  number,
      6         x   number,
      7         y   number);
      8    record_type rec_type;
      9    coords_tab coord_tab := coord_tab();
    10    idx number := 1;
    11  BEGIN
    12    Open cur1 for select * from another_table order by id desc;
    13    LOOP
    14        fetch cur1 into record_type;
    15        exit when cur1%notfound;
    16        coords_tab.extend() ;
    17        coords_tab(idx) := coord(record_type.id, record_type.x , record_type.y);
    18        idx := idx + 1;
    19    End LOOP;
    20  --  EXECUTE IMMEDIATE 'insert into demo_table values (1,:1)' USING coords_tab ;
    21    insert into demo_table values (1,coords_tab);
    22  End;
    23  /
    PL/SQL procedure successfully completed.
    SCOTT@orcl_11gR2> select * from demo_table
      2  /
            ID
    COORDS(ID, X, Y)
             1
    COORD_TAB(COORD(60, 50, 40), COORD(10, 20, 30))
    1 row selected.
    SCOTT@orcl_11gR2>

  • InsertXML nested table

    Hello, I'm trying to insert to nested table xml clob using DBMS_XMLSave.insertXML.
    But xsu inserts to nested table for each row the same data !
    Are there any limitation to use DBMS_XMLSave.insertXML for nested table ?
    This is the xml I'm trying to insert, table dept have the same structure as xml with nested table emplist.
    (xml is generated with DBMS_XMLQuery ...,)
    | <ROWSET>
    | <ROW num="1">
    | <DEPTNO>1</DEPTNO>
    | <EMPLIST>
    | <EMPLIST_ITEM>
    | <EMPNO>1</EMPNO>
    | <ENAME>pkdahle</ENAME>
    | <SALARY>10</SALARY>
    | <EMPADDR>
    | <STREET>u</STREET>
    | <CITY>c</CITY>
    | <STATE>s </STATE>
    | <ZIP>z</ZIP>
    | </EMPADDR>
    | </EMPLIST_ITEM>
    | <EMPLIST_ITEM>
    | <EMPNO>2</EMPNO>
    | <ENAME>pkahle2</ENAME>
    | <SALARY>101</SALARY>
    | <EMPADDR>
    | <STREET>us</STREET>
    | <CITY>cc</CITY>
    | <STATE>sc</STATE>
    | <ZIP>zc</ZIP>
    | </EMPADDR>
    | </EMPLIST_ITEM>
    | </EMPLIST>
    | </ROW>
    | <ROW num="2">
    | <DEPTNO>2</DEPTNO>
    | <EMPLIST>
    | <EMPLIST_ITEM>
    | <EMPNO>1</EMPNO>
    | <ENAME>pkdahle</ENAME> -- this won't be saved in emplist (ename form previous row num=1 will be saved)
    | <SALARY>10</SALARY>
    | <EMPADDR>
    | <STREET>u</STREET>
    | <CITY>c</CITY>
    | <STATE>s </STATE>
    | <ZIP>z</ZIP>
    | </EMPADDR>
    | </EMPLIST_ITEM>
    | <EMPLIST_ITEM>
    | <EMPNO>2</EMPNO>
    | <ENAME>pkahle2</ENAME>
    | <SALARY>101</SALARY>
    | <EMPADDR>
    | <STREET>us</STREET>
    | <CITY>cc</CITY>
    | <STATE>sc</STATE>
    | <ZIP>zc</ZIP>
    | </EMPADDR>
    | </EMPLIST_ITEM>
    | </EMPLIST>
    | </ROW>
    | </ROWSET>
    Thank's

    I've created a simple example :
    1.Create types and table.
    2.Fill table with sample data
    3.Run queryCtx := DBMS_XMLQuery.newContext('select * from TestTable'); to generate XML
    4.delete testtable
    5.Run rows := DBMS_XMLSave.insertXML(insCtx,xmlDoc); with the generated xml.
    6.The table testtable will have 2 rows with the same 1 row collection xlist !!!
    CREATE OR REPLACE TYPE Test_Type
    AS OBJECT (
    x number
    create or replace type Test_List_Type as table of Test_Type
    create table TestTable (
    XX number,
    XLIst Test_List_Type
    nested table XLIst store as TestTable_XLIst_NEST
    insert into
    testtable
    (xx,xlist)
    values
    (1,Test_List_Type (test_type(10)))
    insert into
    testtable
    (xx,xlist)
    values
    (1,Test_List_Type (test_type(10)))
    insert into
    testtable
    (xx,xlist)
    values
    (2,Test_List_Type (test_type(20),test_type(21),test_type(22),test_type(23)))
    script to insert xml
    declare
    insCtx DBMS_XMLSave.ctxType;
    rows number;
    xmldoc clob;
    -- xxslt clob;
    begin
    select cclob into xmldoc from cc.ka_clob; -- (I've stored xml in this table)
    insCtx := DBMS_XMLSave.newContext('testtable'); -- get the context handle
    DBMS_XMLSave.Setignorecase(insctx,1);
    rows := DBMS_XMLSave.insertXML(insCtx,xmlDoc); -- this inserts the document
    DBMS_XMLSave.closeContext(insCtx); -- this closes the handle
    commit;
    end;

  • Export using TOAD for a nested table?

    I am trying to export a nested table via TOAD, however, the fields which are part of nested data (dataset) does not export.
    Any suggestions on an alternative solution?
    Thanks.
    Jaffee

      idx := tab.next (idx);

Maybe you are looking for

  • Ascii to hexa on Labview 7.0

    Hello, Within a school project, we are using Labview 7.0 to display and process frames we receive on a serial port. The frames are received in a ascii mode. We would like to know the programming structure to convert these ascii frames in hexadecimal

  • Unable to launch Trial version of Elements 12  Using Windows 7  64bit

    Hi I am unable to launch the trial version of Elements 12.  I am using Windows 7  64 bit originally downloaded and used through a Mozilla Firefox browser. The photo editor starts to launch but then reverts to 'Quit' screen, with no further options

  • Reinstall mavericks without internet connection

    hello , i have a MacBook Pro 13 , and i want to reinstall my mavericks but i search on the internet and i see that it download it and install it aftert it format the hardisk and begin to install the mavericks . the problem is that i don't have fast c

  • Starting background task in labview

    Let me outline what I am looking to do.  I'm not sure if a background task is the best descriptor, but it's the one I'm coming up with.  it's tricky to explain, but here goes ..... When we start the program, we want to start the background task/alter

  • Search for a phrase with RH8

    Hello, I use RH8 to produce WebHelp. I thought that we should be able to search for a phrase by enclosing the search terms in double quotes. However, I have never been able to use the double quotes to look for a phrase. It still returns topics that h