DBAsupport.com Forums - Powered by vBulletin
Results 1 to 2 of 2

Thread: How to load two dimentional data into table

  1. #1
    Join Date
    Apr 2002
    Posts
    73

    How to load two dimentional data into table

    Please advise for workaroud way to load two dimensional data into global temporary table,
    The PL/SQL is the script work fine for loading one dimension data.



    SQL> CREATE GLOBAL TEMPORARY TABLE t_transaction (c VARCHAR2(4000))
    2 ON COMMIT DELETE ROWS;

    SQL> CREATE OR REPLACE TYPE LISTOFOBJS AS OBJECT OF (DEPTNO NUMBER(10),DNAME varchar(20), LOC varchar2(10));

    SQL> select * from dept;

    DEPTNO DNAME LOC
    ---------- -------------- -------------
    20 RESEARCH DALLAS
    30 SALES CHICAGO
    40 OPERATIONS BOSTON


    SQL> declare
    2 mytype LISTOFOBJS := LISTOFIDS(20,RESEARCH, DALLAS,30, SALES, CHICAGO,40 ,OPERATIONS, BOSTON);
    3 begin
    4 FOR i IN mytype.FIRST .. mytype.LAST
    5 Loop
    6 insert into t_transaction values (mytype(i));
    7 end loop;

  2. #2
    Join Date
    Jul 2003
    Posts
    53
    U need To create global temporary table with the object data type what u want to insert. Now presently it will work for scalar datatypes
    anu

Posting Permissions

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


Click Here to Expand Forum to Full Width