Nested tables and multiset operators in Oracle 10g

Consider the following scenario:
We have two identical relations R and S defined as:
CREATE TABLE R(
a INTEGER,
b table_type)
NESTED TABLE b STORE as b_1;
CREATE TABLE S(
a INTEGER,
b table_type)
NESTED TABLE b STORE as b_2;
where table_typ is defined as
CREATE TYPE table_typ AS TABLE OF VARCHAR2(8);
Suppose we have two instances of R and S, each having one tuple as follows: R(1,table_typ('a','b')) and S(1,table_typ('b','c')).
I would like to "merge" these two simple instances (e.g., achieve the effect of a simple SELECT * FROM R UNION SELECT * FROM S query) and obtain the following resulting instance: Result(1,table_typ('a','b','c')).
Would this be possible in Oracle 10g? A simple UNION does not work (I got a "inconsistent datatypes: expected - got SCOTT.TABLE_TYP" error). I also took a look at the MULTISET UNION operator over nested tables available in Oracle 10g, but it doesn't seem to get me anywhere. Any help on this would be greatly appreciated.
Thank you,
Laura

Oracle Database 10g Enterprise Edition Release 10.1.0.2.0 - 64bit Production
With the Partitioning, OLAP and Data Mining options
SQL> CREATE OR REPLACE TYPE table_type AS TABLE OF VARCHAR2 (8);
  2  /
Type created.
SQL> CREATE TABLE r(
  2    a INTEGER,
  3    b table_type)
  4    NESTED TABLE b STORE as b_1;
Table created.
SQL> CREATE TABLE s(
  2    a INTEGER,
  3    b table_type)
  4    NESTED TABLE b STORE as b_2;
Table created.
SQL> INSERT INTO r VALUES (1, table_type ('a', 'b'));
1 row created.
SQL> INSERT INTO s VALUES (1, table_type ('b', 'c'));
1 row created.
SQL> COLUMN c FORMAT A10;
SQL> SELECT r.a, r.b MULTISET UNION DISTINCT s.b c
  2  FROM   r, s
  3  WHERE  r.a = s.a;
         A C
         1 TABLE_TYPE('a', 'b', 'c')
SQL>

Similar Messages

  • ROLLUP AND CUBE OPERATORS IN ORACLE 8I

    제품 : PL/SQL
    작성날짜 : 2000-06-29
    ========================================
    ROLLUP AND CUBE OPERATORS IN ORACLE 8I
    ========================================
    PURPOSE
    ROLLUP 과 CUBE Operator에 대해 설명하고자 한다.
    Explanation
    ROLLUP operator는 SELECT문의 GROUP BY절에 사용된다.
    SELECT절에 ROLLUP 을 사용함으로써 'regular rows'(보통의 select된 data)와
    'super-aggregate rows'(총계)을 구할 수 있다. 기존에는 select ... union select
    를 이용해 구사해야 했었던 것이다. 'super-aggregate rows'는 'sub-total'
    (중간 Total, 즉 소계)을 포함한다.
    CUBE operator는 Cross-tab에 대한 Summary를 추출하는데 사용된다. 모든 가능한
    dimension에 대한 total을 나타낸다. 즉 ROLLUP에 의해 나타내어지는 item total값과
    column total값을 나타낸다.
    NULL값은 모든 값에 대한 super-aggregate 을 나타낸다. GROUPING() function은
    모든 값에 대한 set을 나타내는 null값과 column의 null값과 구별하는데 쓰여진다.
    GROUPING() function은 GROUP BY절에서 반드시 표현되어야 한다. GROUPING()은 모든
    값의 set을 표현합에 있어서 null이면 1을 아니면 0을 return한다.
    ROLLUP과 CUBE는 CREATE MATERIALIZED VIEW에서 사용되어 질수 있다.
    Example
    아래와 같이 테스트에 쓰여질 table과 data을 만든다.
    create table test_roll
    (YEAR NUMBER(4),
    REGION CHAR(7),
    DEPT CHAR(2),
    PROFIT NUMBER );
    insert into test_roll values (1995 ,'West' , 'A1' , 100);
    insert into test_roll values (1995 ,'West' , 'A2' , 100);
    insert into test_roll values (1996 ,'West' , 'A1' , 100);
    insert into test_roll values (1996 ,'West' , 'A2' , 100);
    insert into test_roll values (1995 ,'Central' ,'A1' , 100);
    insert into test_roll values (1995 ,'East' , 'A1' , 100);
    insert into test_roll values (1995 ,'East' , 'A2' , 100);
    SQL> select * from test_roll;
    YEAR REGION DE PROFIT
    1995 West A1 100
    1995 West A2 100
    1996 West A1 100
    1996 West A2 100
    1995 Central A1 100
    1995 East A1 100
    1995 East A2 100
    7 rows selected.
    예제 1: ROLLUP
    SQL> select year, region, sum(profit), count(*)
    from test_roll
    group by rollup(year, region);
    YEAR REGION SUM(PROFIT) COUNT(*)
    1995 Central 100 1
    1995 East 200 2
    1995 West 200 2
    1995 500 5
    1996 West 200 2
    1996 200 2
    700 7
    7 rows selected.
    위의 내용을 tabular로 나타내어 보면 쉽게 알 수 있다.
    Year Central(A1+A2) East(A1+A2) West(A1+A2)
    1995 (100+NULL) (100+100) (100+100) 500
    1996 (NULL+NULL) (NULL+NULL) (100+100) 200
    700
    예제 2: ROLLUP and GROUPING()
    SQL> select year, region, sum(profit),
    grouping(year) "Y", grouping(region) "R"
    from test_roll
    group by rollup (year, region);
    YEAR REGION SUM(PROFIT) Y R
    1995 Central 100 0 0
    1995 East 200 0 0
    1995 West 200 0 0
    1995 500 0 1
    1996 West 200 0 0
    1996 200 0 1
    700 1 1
    7 rows selected.
    참고) null값이 모든 값의 set에 대한 표현으로 나타내어지면 GROUPING function은
    super-aggregate row에 대해 1을 return한다.
    예제 3: CUBE
    SQL> select year, region, sum(profit), count(*)
    from test_roll
    group by cube(year, region);
    YEAR REGION SUM(PROFIT) COUNT(*)
    1995 Central 100 1
    1995 East 200 2
    1995 West 200 2
    1995 500 5
    1996 West 200 2
    1996 200 2
    Central 100 1
    East 200 2
    West 400 4
    700 7
    위의 내용을 tabular로 나타내어 보면 쉽게 알 수 있다.
    Year Central(A1+A2) East(A1+A2) West(A1+A2)
    1995 (100+NULL) (100+100) (100+100) 500
    1996 (NULL+NULL) (NULL+NULL) (100+100) 200
    100 200 400 700
    예제 4: CUBE and GROUPING()
    SQL> select year, region, sum(profit),
    grouping(year) "Y", grouping(region) "R"
    from test_roll
    group by cube (year, region);
    YEAR REGION SUM(PROFIT) Y R
    1995 Central 100 0 0
    1995 East 200 0 0
    1995 West 200 0 0
    1995 500 0 1
    1996 West 200 0 0
    1996 200 0 1
    Central 100 1 0
    East 200 1 0
    West 400 1 0
    700 1 1
    10 rows selected.
    ===============================================
    HOW TO USE ROLLUP AND CUBE OPERATORS IN PL/SQL
    ===============================================
    Release 8.1.5 PL/SQL에서는 CUBE, ROLLUP 이 지원되지 않는다. 8i에서는 DBMS_SQL
    package을 이용하여 dynamic SQL로 구현하는 방법이 workaround로 제시된다.
    Ordacle8i에서는 PL/SQL block에 SQL절을 직접적으로 위치시키는 Native Dynamic SQL
    (참고 bul#11721)을 지원한다.
    Native Dynamic SQL을 사용하기 위해서는 COMPATIBLE 이 8.1.0 또는 그 보다 높아야
    한다.
    SVRMGR> show parameter compatible
    NAME TYPE VALUE
    compatible string 8.1.0
    예제 1-1: ROLLUP -> 위의 예제 1과 비교한다.
    SQL> create or replace procedure test_rollup as
    my_year test_roll.year%type;
    my_region test_roll.region%type;
    my_sum int;
    my_count int;
    begin
    select year, region, sum(profit), count(*)
    into my_year, my_region, my_sum, my_count
    from test_roll
    group by rollup(year, region);
    end;
    Warning: Procedure created with compilation errors.
    SQL> show errors
    Errors for PROCEDURE TEST_ROLLUP:
    LINE/COL ERROR
    10/8 PL/SQL: SQL Statement ignored
    13/18 PLS-00201: identifier 'ROLLUP' must be declared
    SQL> create or replace procedure test_rollup as
    type curTyp is ref cursor;
    sql_stmt varchar2(200);
    tab_cv curTyp;
    my_year test_roll.year%type;
    my_region test_roll.region%type;
    my_sum int;
    my_count int;
    begin
    sql_stmt := 'select year, region, sum(profit), count(*) ' ||
    'from test_roll ' ||
    'group by rollup(year, region)';
    open tab_cv for sql_stmt;
    loop
    fetch tab_cv into my_year, my_region, my_sum, my_count;
    exit when tab_cv%NOTFOUND;
    dbms_output.put_line (my_year || ' '||
    nvl(my_region,' ') ||
    ' ' || my_sum || ' ' || my_count);
    end loop;
    close tab_cv;
    end;
    SQL> set serveroutput on
    SQL> exec test_rollup
    1995 Central 100 1
    1995 East 200 2
    1995 West 200 2
    1995 500 5
    1996 West 200 2
    1996 200 2
    700 7
    PL/SQL procedure successfully completed.
    예제 2-1: ROLLUP and GROUPING() -> 위의 예제 2와 비교한다.
    SQL> create or replace procedure test_rollupg as
    my_year test_roll.year%type;
    my_region test_roll.region%type;
    my_sum int;
    my_count int;
    my_g_region int;
    my_g_year int;
    begin
    select year, region, sum(profit),
    grouping(year), grouping(region)
    into my_year, my_region, my_sum, my_count,
    my_g_year, my_g_region
    from test_roll
    group by rollup(year, region);
    end;
    Warning: Procedure created with compilation errors.
    SQL> show error
    Errors for PROCEDURE TEST_ROLLUPG:
    LINE/COL ERROR
    12/4 PL/SQL: SQL Statement ignored
    17/13 PLS-00201: identifier 'ROLLUP' must be declared
    SQL> create or replace procedure test_rollupg as
    type curTyp is ref cursor;
    sql_stmt varchar2(200);
    tab_cv curTyp;
    my_year test_roll.year%type;
    my_region test_roll.region%type;
    my_sum int;
    my_count int;
    my_g_region int;
    my_g_year int;
    begin
    sql_stmt := 'select year, region, sum(profit), count(*), ' ||
    'grouping(year), grouping(region) ' ||
    'from test_roll ' ||
    'group by rollup(year, region)';
    open tab_cv for sql_stmt;
    loop
    fetch tab_cv into my_year, my_region, my_sum, my_count,
    my_g_year, my_g_region;
    exit when tab_cv%NOTFOUND;
    dbms_output.put_line (my_year || ' '||my_region ||
    ' ' || my_sum || ' ' || my_count ||
    ' ' || my_g_year || ' ' || my_g_region);
    end loop;
    close tab_cv;
    end;
    Procedure created.
    SQL> set serveroutput on
    SQL> exec test_rollupg
    1995 Central 100 1 0 0
    1995 East 200 2 0 0
    1995 West 200 2 0 0
    1995 500 5 0 1
    1996 West 200 2 0 0
    1996 200 2 0 1
    700 7 1 1
    PL/SQL procedure successfully completed.
    예제 3-1: CUBE -> 위의 예제 3과 비교한다.
    SQL> create or replace procedure test_cube as
    my_year test_roll.year%type;
    my_region test_roll.region%type;
    my_sum int;
    my_count int;
    begin
    select year, region, sum(profit), count(*)
    into my_year, my_region, my_sum, my_count
    from test_roll
    group by cube(year, region);
    end;
    Warning: Procedure created with compilation errors.
    SQL> show error
    Errors for PROCEDURE TEST_CUBE:
    LINE/COL ERROR
    10/4 PL/SQL: SQL Statement ignored
    13/13 PLS-00201: identifier 'CUBE' must be declared
    SQL> create or replace procedure test_cube as
    type curTyp is ref cursor;
    sql_stmt varchar2(200);
    tab_cv curTyp;
    my_year test_roll.year%type;
    my_region test_roll.region%type;
    my_sum int;
    my_count int;
    begin
    sql_stmt := 'select year, region, sum(profit), count(*) ' ||
    'from test_roll ' ||
    'group by cube(year, region)';
    open tab_cv for sql_stmt;
    loop
    fetch tab_cv into my_year, my_region, my_sum, my_count;
    exit when tab_cv%NOTFOUND;
    dbms_output.put_line (my_year || ' '||
    nvl(my_region,' ') ||
    ' ' || my_sum || ' ' || my_count);
    end loop;
    close tab_cv;
    end;
    Procedure created.
    SQL> set serveroutput on
    SQL> exec test_cube
    1995 Central 100 1
    1995 East 200 2
    1995 West 200 2
    1995 500 5
    1996 West 200 2
    1996 200 2
    Central 100 1
    East 200 2
    West 400 4
    700 7
    PL/SQL procedure successfully completed.
    예제 4-1: CUBE and GROUPING() -> 위의 예제 4와 비교한다.
    SQL> create or replace procedure test_cubeg as
    my_year test_roll.year%type;
    my_region test_roll.region%type;
    my_sum int;
    my_count int;
    my_g_region int;
    my_g_year int;
    begin
    select year, region, sum(profit),
    grouping(year), grouping(region)
    into my_year, my_region, my_sum, my_count,
    my_g_year, my_g_region
    from test_roll
    group by cube(year, region);
    end;
    Warning: Procedure created with compilation errors.
    SQL> show error
    Errors for PROCEDURE TEST_CUBEG:
    LINE/COL ERROR
    12/4 PL/SQL: SQL Statement ignored
    17/13 PLS-00201: identifier 'CUBE' must be declared
    SQL> create or replace procedure test_cubeg as
    type curTyp is ref cursor;
    sql_stmt varchar2(200);
    tab_cv curTyp;
    my_year test_roll.year%type;
    my_region test_roll.region%type;
    my_sum int;
    my_count int;
    my_g_region int;
    my_g_year int;
    begin
    sql_stmt := 'select year, region, sum(profit), count(*), ' ||
    'grouping(year), grouping(region) ' ||
    'from test_roll ' ||
    'group by cube(year, region)';
    open tab_cv for sql_stmt;
    loop
    fetch tab_cv into my_year, my_region, my_sum, my_count,
    my_g_year, my_g_region;
    exit when tab_cv%NOTFOUND;
    dbms_output.put_line (my_year || ' '||my_region ||
    ' ' || my_sum || ' ' || my_count ||
    ' ' || my_g_year || ' ' || my_g_region);
    end loop;
    close tab_cv;
    end;
    Procedure created.
    SQL> set serveroutput on
    SQL> exec test_cubeg
    1995 Central 100 1 0 0
    1995 East 200 2 0 0
    1995 West 200 2 0 0
    1995 500 5 0 1
    1996 West 200 2 0 0
    1996 200 2 0 1
    Central 100 1 1 0
    East 200 2 1 0
    West 400 4 1 0
    700 7 1 1
    PL/SQL procedure successfully completed.
    Reference Ducumment
    Note:67988.1

    Hello,
    As previously posted you should use export and import utilities.
    To execute exp or imp statements you have just to open a command line interface, for instance,
    a DOS box on Windows.
    So you don't have to use SQL*Plus or TOAD.
    About export/import you may care on the mode, to export a single or a list of Tables the Table mode
    is enough.
    Please, find here an example to begin:
    http://wiki.oracle.com/page/Oracle+export+and+import+
    Hope this help.
    Best regards,
    Jean-Valentin

  • Nested Tables and Advanced Queues- Please Help.

    How do i work with NestedTable type and Advanced Queue.
    I have done the following
    I have Oracle 8.1.7 enterprise edition.
    create type myType as TABLE OF varchar(32);
    create type myObject as OBJECT (
    id int,
    myt myType);
    DECLARE
    BEGIN
    dbms_aqadm.create_queue_table(
    queue_table => 'my_queue_table',
    multiple_consumers => TRUE,
    queue_payload_type => 'myObject',
    compatible => '8.1.3'
    END;
    The Nested Table and Object are created successfully.
    but the queue is not created.
    I get the following message.
    DECLARE
    ERROR at line 1:
    ORA-22913: must specify table name for nested table column or
    attribute
    ORA-06512: at "SYS.DBMS_AQADM_SYS", line 2012
    ORA-06512: at "SYS.DBMS_AQADM", line 55
    ORA-06512: at line 3
    I know how to specify the nested table storage clause for
    create table statement, but there is no provision for
    it in the create_queue_table procedure.
    Any help will be greately appriciated.
    i have already created and tested aqs with simple data types,
    also i have created simple tables with nested table type
    elements.
    but the combo of Nested tables and AQ is not working.
    thanks in advance.

    Hi Francois. Thank you very much for your reply, but it seems that i still get errors. So let me tell what i have done.
    As you suggested me: i have done a block based on a sub-query for the nested-table:
    'select courses from department where name= :department.name'.
    In the master block(department) i have the when-new-record-instance trigger:
    Declare
    LC$Req varchar2(256);
    Begin
    LC$Req := '(select ns.courses from table
    ( select courses from department where name = ''' || :DEPARTMENT.name || ''' ) ns )';
    Go_block('block11');
    Clear_Block ;
    Set_Block_Property( 'block11', QUERY_DATA_SOURCE_NAME, LC$Req ) ;
    Execute_query ;
    End ;
    Now the errors i receive, this time in the runtime mode are:
    - FRM-41380: Cannot set the blocks query data source
    -FRM-41003: This function cannot be performed here.
    Since it seems that you know how to work with the nested table i would really appreaciate your help. I am new in the nested table and if you could give an ex with my tables it would be great.
    Thank you in advance.

  • Unable to export nested tables and vaarys

    Hai
    How to export nested tables and varrays in oracle 8i (8.1.6) .When exporting nested tables and varrays not exporting .What is the advantage use of nested tables and varrays
    Thanks in advance
    mohan

    Hello,
    I think that with such a new release you should use DataPump (expdp/impdb) to
    export Tables.
    For exporting a complete Schema you may use the following syntax:
    expdp {color:red}+user+{color}/{color:red}+password+{color} PARFILE=pfexport.txt_With pfexport.txt as bellow:_
    SCHEMAS={color:red}+schema_name+{color}
    FLASHBACK_TIME="TO_TIMESTAMP(to_char(SYSDATE,'DD-MM-YYYY HH24:MI:SS'),'DD-MM-YYYY HH24:MI:SS')"
    CONTENT=ALL
    DIRECTORY=EXP_DIR
    DUMPFILE={color:red}+dump_file_name+{color}
    LOGFILE={color:red}+log_file_name+{color}Then, in this example, you'll get the "dump file" and the "log file" into the EXP_DIR Oracle directory (if it exists).
    You can check your Oracle Directories with the following query:
    select * from dba_directories;Then, you can use one of these Directories or create a new one with the following statement
    CREATE OR REPLACE DIRECTORY {color:red}+directory_name+{color} AS '{color:red}+directory_path+{color}';
    GRANT READ,WRITE ON DIRECTORY {color:red}+directory_name+{color} TO {color:red}+user_name+{color};Hope it can help,
    Best regards,
    Jean-Valentin
    Edited by: Lubiez Jean-Valentin on Nov 28, 2009 12:08 PM

  • Nested tables and varray

    hi friends,
    i have a question:
    why do we use nested tables and varrays?

    Read the following and try to understand the examples. Try to relate them to various situations or scenarios where you can implement them. You will understand the benefits.
    http://download.oracle.com/docs/cd/B19306_01/appdev.102/b14261/collections.htm#LNPLS005
    http://download.oracle.com/docs/cd/B19306_01/appdev.102/b14261/tuning.htm#LNPLS01205

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

  • Difference between  exists and in operators in oracle?

    what is difference between exists and in operators in oracle?
    what is faster and why?

    Malli wrote:
    what is difference between exists and in operators in oracle?
    what is faster and why?Is this a homework question?
    Have you done any tests yourself to see which is faster?

  • Porting data from Oracle8i to XML and from XML  to Oracle 10g

    Hai
    I have a client database (using oracle 8i) and a server database (oracle 10g).
    Due to lack of leased line connectivity i want to port these offline data from 8i to 10g
    using a modem(dial up connection).Is there is any way to port data from 8i to XML
    and from XML to 10g.
    thanks in advance
    dejies

    Thanks Nicolas,
    As per documentation, it seems to be difficult for export/import from Oracle8i to 10g. Is that any way to achieve this? I have to append the newly imported data with old or exisiting data into Oracle10g.
    Regards
    Nikhil

  • Using nested tables and varrays in Forms/Reports6i

    Hi! Could anybody give practical examples of applications based on nested tables and varrays in Forms/Reports6i.
    The possible schema of building user interface and so on.
    Thank you.
    [email protected]

    Hi,
    Varrays and nested tables are not supported within Forms6i and Reports6i. This means tare is no way to use it.
    Frank

  • Nested Tables and Forms 9i-please help

    Hi
    i have the folowing example of a nested table:
    CREATE TYPE CourseList AS TABLE OF VARCHAR2(10) -- define TABLE type
    CREATE TYPE Student AS OBJECT ( -- create object
    id_num INTEGER(4),
    name VARCHAR2(25),
    address VARCHAR2(35),
    status CHAR(2),
    courses CourseList) -- declare nested table as attribute
    CREATE TYPE Course AS OBJECT (
    course_no NUMBER(4),
    title VARCHAR2(35),
    credits NUMBER(1));
    CREATE TYPE CourseList AS TABLE OF Course;
    CREATE TABLE department (name VARCHAR2(20),
    director VARCHAR2(20),
    office VARCHAR2(20),
    courses CourseList)
    NESTED TABLE courses STORE AS courses_tab;
    In Forms i have created a data block based on table department and for managing the nested table courses_tab i found out that i should use a stored procedure:
    PROCEDURE procedure_nest (c_c out courses_tab%rowtype) IS
    c_c courselist;
    BEGIN
    select c.name, c.director,office into :department.name, :department.director,
    :department.office from department c , table
    (select n.courses from department n where c.name =n.name and rownum<=1);
    END;
    compil error:
    error 999 at line 1, column 35
    implemntation restriction (may be temporary) ADT or schema level
    collection not supported at client side with non-OCI mode.
    i really would like to know what shall i do to use and manage the nested table in forms.
    Thank you very much

    Hi Francois. Thank you very much for your reply, but it seems that i still get errors. So let me tell what i have done.
    As you suggested me: i have done a block based on a sub-query for the nested-table:
    'select courses from department where name= :department.name'.
    In the master block(department) i have the when-new-record-instance trigger:
    Declare
    LC$Req varchar2(256);
    Begin
    LC$Req := '(select ns.courses from table
    ( select courses from department where name = ''' || :DEPARTMENT.name || ''' ) ns )';
    Go_block('block11');
    Clear_Block ;
    Set_Block_Property( 'block11', QUERY_DATA_SOURCE_NAME, LC$Req ) ;
    Execute_query ;
    End ;
    Now the errors i receive, this time in the runtime mode are:
    - FRM-41380: Cannot set the blocks query data source
    -FRM-41003: This function cannot be performed here.
    Since it seems that you know how to work with the nested table i would really appreaciate your help. I am new in the nested table and if you could give an ex with my tables it would be great.
    Thank you in advance.

  • What is the function of _xdb and _xpt services in oracle 10g database.

    what is the function of xdb and xpt services in oracle 10g database.?

    Hi,
    If you are troubleshooting check the below link too:
    Issues installing.  Listener not working
    Best regards,
    Rafi.
    http://rafioracledba.blogspot.com/

  • How to select data from one nested table and into another nested table

    create or replace
    TYPE ctxt_code_rec as object
    ctxt_header varchar2(10),
    header_description varchar2(300),
    status varchar2(30),
    adjacent_code varchar2(300),
    adjacent_desc Varchar2(400),
    adjacent_flag varchar2(4000),
    adjacent_text_href varchar2(4000)
    create or replace
    type ctxt_code_table as table of CTXT_CODE_REC
    d_table ctxt_code_table ;
    v_tab ctxt_code_table ;
    Iam trying to select data from d_table to v_tab
    using and bulk collect into
    select m.*
    bulk collect into p_code_result
    from table(l_loop_diag_code_table1)m
    order by 1;
    Receiving error:
    ora 94007 : not enoughvalues
    Could you please let me know how to solve it?
    Thanks,
    in advance

    >
    create or replace
    TYPE ctxt_code_rec as object
    ctxt_header varchar2(10),
    header_description varchar2(300),
    status varchar2(30),
    adjacent_code varchar2(300),
    adjacent_desc Varchar2(400),
    adjacent_flag varchar2(4000),
    adjacent_text_href varchar2(4000)
    create or replace
    type ctxt_code_table as table of CTXT_CODE_REC
    d_table ctxt_code_table ;
    v_tab ctxt_code_table ;
    Iam trying to select data from d_table to v_tab
    using and bulk collect into
    select m.*
    bulk collect into p_code_result
    from table(l_loop_diag_code_table1)m
    order by 1;
    Receiving error:
    ora 94007 : not enoughvalues
    Could you please let me know how to solve it?
    >
    Not unless you provide the code you are actually using.
    There is no definition of 'p_code_result' in your post and you say you 'trying to select data from d_table' but there is no code that loads 'd_table' in what you posted.
    And the SELECT query you posted actuall selects from an object named 'l_loop_idag_code_table1' which isn't mentioned in your code.
    Post the actual code you are using and all of the structures being used.
    Also explain why you even need to use nested tables and PL/SQL for whatever it is you are really doing.

  • How to install NW2004s abap and/or java on Oracle 10g on SLES 10 32 bit?

    Does anyone know - How to install NW2004s abap and/or java on Oracle 10g on SLES 10 32 bit?
    Does SAP offer the software for trial for this?
    Jay

    Hi Check the link page you shall get the PDF and then goto Page 50 .you shall find the details.
    https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/3096e412-7308-2b10-4999-e16c64ce5eeb
    Thanks
    Rishi Abrol

  • JSP: DispalyTag - Nested table and rows

    Hi!
    I�d like to know if it�s possibile create new row with dispalytag.
    I have a nested table (and long list), but I�d like to have the items under the header, not items in a column of the header. I tried with <tr> but doesn�t work.
    Is it possibile to creat a row? And how??? I thought I must use decorators (org.displaytag.model.Row) but when I run my application it doesn't work.
    Can you help me?
    Thanks
    Annalisa

    Thanks for the quick response. I was thinking I might get a response from someone who had tried it, so I didn't waste time trying it myself. I consider your response is pretty authoritative, and I'll take that as a sign that I should forget the nested tables design.
    No, polymorphic views probably won't do the job. I think I'll just go ahead and create staging versions of each detail table with foreign keys back to the master staging table. Then I'll let the wizard create the needed association objects and view links in ADF BC. It will complicate the procedure for applying changes, particularly adding a row to the change history table. But that's the price we'll need to pay.
    OTOH - I just had a thought - since the change history table is mostly for auditing, it appears in some reports, but has no CRUD in the application, other than the insert when the changes are applied. If I did that insert with a trigger or some other PL/SQL, then the change history could still be a single table with nested table columns for the details.

  • Installing and configuring PHP for ORACLE 10g Release 1

    Hello Lads,
    Please can anybody help me finish PHP install...
    I have got this error when executing the following command..
    #make install
    Here is the error:
    /usr/local/php-5.1.4/sapi/cli/php: error while loading shared libraries: libclntsh.so.10.1: cannot open shared object file: No such file or directory
    Thanks!

    I answered in your other thread... the one without the I in the title :)
    nstalling and configuring PHP for ORACLE 10g Release 1

Maybe you are looking for

  • Stored subprogram execution status

    Hi Friends, I need a information regarding PL/SQL stored procedure and function. My query is whenever i am executing a pl/sql procedure or function,how can i get the execution status of that stored procedure or function..that means whether it is alre

  • Payable invoice status

    Hi all, i need to select the invoice status field(no the invoice approval status) to used it in a customized report. Can you hrlp me. Best Regards, Hany

  • External swf and the tween class

    i have an external swf which i import into my main swf using the loadMovie command. my external swf has some tween class animations in it. if i run the main movie, the external swf movie runs fine of course...but the tween classes are not loaded. am

  • Every time I update some games on my iPad, a different user name appear instead of my username, how do I change it

    Why is it that every time I want to update some games or application on my iPad, a different username appear on it, how do I change it to my username

  • PA30 and ESS functionality

    This is a functionality question rather than a how-to question.  When I load the "Tax Exempt Prohibited" field in table T5UTZ for our tax authority, the corresponding field in PA30 for infotype 210 becomes protected.  But nothing happens in ESS.  The