Dynamically fetaching data into PL/SQL tables help

Hi,
I am develioping a PL/SQL procedure in which I am creatig 24 PL/SQL tables of the same type.
But while inserting data in them I need to use the table names dynamically i.e., the Execute immediate used to put the data into the tables would remain same just I need that for each and every run of for loop for that Execute immediate statement, it should use different table name.
Please see sample code below:
col_name varchar2(20);
Type RA_TABLE is table of CALL_DETAIL_EXCEPTION.IC_CIRCT_GR_CD%TYPE
index by binary_integer;
MY_RA1 RA_TABLE;
MY_RA2 RA_TABLE;
MY_RA3 RA_TABLE;
MY_RA4 RA_TABLE;
BEGIN
for idx in 1..cnt_interval Loop
Col_name := 'MY_RA'||idx;
query1:='select Trunk_info bulk collect INTO MY_RA'|| idx ||' from dbl.vw_cgi v where not exists (select 1 from dbl.varun f
where f.ic_circt_gr_cd= v.TRUNK_INFO and f.call_gmt_dnect_dt_time between
to_date('''||stime||''',''yyyymmddhh24miss'') and to_date('''||etime||''',''yyyymmddhh24miss''))';
Now when I execute this code, it gives me an error for query1 saying that it is unimplemented feature in Oracle.
It is not able to pick up that dynamic table name.
Please help!

user9315951 wrote:
I am develioping a PL/SQL procedure in which I am creatig 24 PL/SQL tables of the same type.All wrong. This is NOT how one treats data in PL/SQL.
There is NO such concept as PL/SQL "+tables+". You are in fact defining associative arrays and not using these as associative arrays, but as normal arrays. Your code can consume vast amounts of server memory as private process memory. Your code CAN crash the Oracle database server (yes, I have seen this multiple times - even in production).
Your code is flawed. Your approach is flawed.
I suggest that you take several steps back, gain some understanding of fundamental Oracle concepts, about what does scale and perform in PL/SQL and SQL, and then apply these concepts and principles.

Similar Messages

  • Importing 30 tables into one SQL Table (Help Required)

    Dear Experts,
    I am new in SQL server, actually i need to gather 30 different excel file in one sql server table and i have imported all excel file in different databases, all tables have 186 different columns and datatypes. I couldnt change data type while conversion.
    Now all columns have different data type which are occupying extra space in my database.
    Now the problem is that i need to convert all databases into one database or table. Although i have created a table but i dont have idea how to import all table into one table  and defining datatype in new table while importing the old tables.
    Please help me in this matter or if any body has skype or any other chatting id please do let me know so that i may explain it better.
    Thanking you in advance.
    Best Regards,
    SQL_beginner

    There are several things you can try.  If you have SSIS, take a look at this.
    http://www.singhvikash.in/2013/06/ssis-how-to-load-multiple-excel-files.html
    https://www.simple-talk.com/sql/ssis/importing-excel-data-into-sql-server-via-ssis-questions-you-were-too-shy-to-ask/
    Also, if your files have virtually the same name, like files with dates in the name, you can loop through files in your folder, and increment the loop with each run through.
    DECLARE @intFlag
    INT
    SET @intFlag
    = 1
    WHILE (@intFlag
    <=30)
    BEGIN
    PRINT @intFlag
    declare @fullpath1
    varchar(1000)
    select @fullpath1
    = '''\\path to your files\'
    + convert(varchar,
    getdate()- @intFlag
    , 112)
    + '_your-text-file-name.txt'''
    declare @cmd1
    nvarchar(1000)
    select @cmd1
    = 'bulk insert [dbo].[your-table-name] from '
    + @fullpath1 +
    ' with (FIELDTERMINATOR = ''\t'', FIRSTROW = 2, ROWTERMINATOR=''0x0a'')'
    exec (@cmd1)
    SET @intFlag
    = @intFlag + 1
    END
    GO
    Knowledge is the only thing that I can give you, and still retain, and we are both better off for it.

  • How to fetch the data from pl/sql table dynamically

    Hi All, I have the requirement of comparing two db views data in pl/sql. So, I have bulk collect the view into pl/sql table. But, the issue is, It is expecting to provide the column name for comparison. But, in my case, column name is dynamic. So, i cannot provide the column name directly for comparison.
    For eg: In my view t1_VW, i have 4 columns. stid, c1,c2,c3,c4 and similar structure for t2_vw
    my code
    TYPE v1_type IS TABLE OF t1_vw%ROWTYPE;
    l_data v1_type;
    TYPE v1_type1 IS TABLE OF t2_vw%ROWTYPE;
    l_data1 v1_type1;
    test varchar2(1000);
    test1 varchar2(1000);
    temp1 number;
    begin
    SELECT * Bulk collect into l_data
    FROM T1_VW;
    SELECT * Bulk collect into l_data1
    FROM T2_VW;
    select l_data(1).stid into temp1 from dual; -- It is working fine and gives me the value properly
    -- But, in my case, we are reading the column names from array, i am constructing the query dynamically and execute it.
    test :='select l_data(1).stid into temp1 from dual';
    execute immediate test into temp1;
    -- I am getting error as follows:
    Error report:
    ORA-00904: "L_DATA": invalid identifier
    ORA-06512: at "SYSTEM.BULKCOMPARISON", line 93
    ORA-06512: at line 2
    00904. 00000 - "%s: invalid identifier"
    *Cause:   
    *Action
    end;
    - Please help me to get rid of this issue. Is it possible to construct the query dynamically and fetch the data?. If not, is there any other better approach to compare the data between two views?.

    Output should display what are all columns changed and its old value and new value.
    For eg., output should be
    COLUMNNAME OLD_VALUE NEW_VALUE STID
    C1 20 10 1
    C2 50 40 2
    C3 60 70 2
    C2 80 90 3Why no do this only via a simple sql ?
    create table a (STID number, C1 number,  C2 number, C3 number);
    insert into a values (1, 20, 30, 40)
    insert into a values (2, 40, 50, 60);
    insert into a values (3, 90, 80, 100);
    create table b as select *
    from a where 1 = 0;
    insert into b values (1, 10, 30, 40)
    insert into b values (2, 40, 40, 70);
    insert into b values (3, 90, 90, 100);
    commit;And now you can issue such a kind of select
    SELECT stid , c1, c2, c3                      
       FROM
      ( SELECT a.*,
             1 src1,
             to_number(null) src2        
       FROM  a   
       UNION ALL
       SELECT b.*,
             to_number(null) src1,
             2  src2        
        FROM b
       GROUP BY stid , c1, c2, c3
       HAVING count(src1) <> count(src2)
       order by stid;I would then create a new table a_b_difference having the same structure as a or b and insert into it like this
    create table a_b_diff as select * from a where 1 = 0;
    insert into a_b_diff
    SELECT stid , c1, c2, c3                      
       FROM
      ( SELECT a.*,
             1 src1,
             to_number(null) src2        
       FROM  a   
       UNION ALL
       SELECT b.*,
             to_number(null) src1,
             2  src2        
        FROM b
       GROUP BY stid , c1, c2, c3
       HAVING count(src1) <> count(src2)
       order by stid
       ;Then each time there is a difference between a column in a and its equivalente one in b (per unique stid ) a record will be inserted in this table.
    You can do more by adding the name of the table in front of each record in this table to see exactly where the data comes from
    Best Regards
    Mohamed Houri

  • Sql/Plsql code to export data into a temporary table from a text file

    Dear all,
    I need to create a temporary table getting data from a text file. I am very new to data loading could you please help me how to read the text file in to a temporary table.
    i have text file like as below:
    order items : books Purchasing
    start date:
    8-11-09
    Notes: Books are selling from aug10 to aug 25
    Action performed
    Time
    Verified By
    sold out from shop, sold out date:_________
    1.
    physics _______ book sold to ravi
    2.
    social _______ book this is a good book
    sold to kiran
    aug10th
    ronald
    3.
    maths book to sal
    4.
    english book__________ this was a newbook
    to raj
    jak
    return to shop, return date:____________
    1.
    maths book return by:_____________ Verify book
    aug11th
    john
    2.
    story book by:_________ checked
    aug14th
    Now i need to create a temporary table and insert the data into the table from this text file.
    Now i need to create a temporary table named as books_order with 5columns(order,Status,Action_Performed,Time,Verified_By) like as below:
    Order     status     Action_Performed     Time     Verified_By
    books Purchasing     sold     physics _______ book sold to ravi     _______     _________
    books Purchasing     sold     social _______ book this is a good book sold to kiran aug10th     ronald
    books Purchasing sold     maths book to sal     _____     __________
    books Purchasing     sold     english book__________ this was a newbook to raj __________     jak
    books Purchasing return     maths book return by:_____________ Verify book aug11th     john
    books Purchasing     return     story book by:_________ checked aug14th     _________
    Thanks in advance.

    Isn't school work marvelous?
    Create an external table.
    http://www.morganslibrary.org/reference/externaltab.html
    Getting the data into a temporary table may make sense in SQL Server ... but not in Oracle.

  • INSERTING DATA INTO A SQL SERVER 2005 TABLE, WHICH HAS A IDENTITY COLUMN

    Hi All,
    I have to insert the data into a SQL SERVER 2005 Database table.
    I am able to insert the data into a normal SQL Server table.
    When I am trying to insert the data into a SQL Server table, which has a identity column (i.e. auto increment column in Oracle) I am getting error saying that can't insert value explicitly when IDENTITY_INSERT is set to OFF.
    Had anybody tried this??
    There are some SRs on this issue, Oracle agreed that it is a bug. I am wondering if there is any workaround from any one of you (refer Insert in MS-SQL database table with IDENTITY COLUMN
    Thanks
    V Kumar

    Even I had raised a SR on this in October 2008. But didn't get any solution for a long time, finally I had removed the identity column from the table. I can't to that now :).
    I am using 10.1.3.3.0 and MS SQL SERVER 2005, They said it is working for MS SQL SERVER TABLE, if the identity column is not a primary key and asked me to refer to note 744735.1.
    I had followed that note, but still it is not working for me.
    But my requirement is it should work for a MS SQL SERVER 2005 table, which has identity column as primary key.
    Thanks
    V Kumar

  • Writing a stored procedure to import SQL Server table data into a Oracle table

    Hello,
    As a new DBA I have been tasked with writing a stored procedure to import SQL Server table data into an Oracle table. I have been given many suggestions on how to do it from SQL Server but I I just need to write a stored procedure to run it from the Oracle side. Suggestions/guidance on where to start would be greatly appreciated! Thank you!
    I started to write it based on what I have but I know this is not correct :/
    # Here is the select statement for the data source in SQL Server...
    SELECT COMPANY
    ,CUSTOMER
    ,TRANS_TYPE
    ,INVOICE
    ,TRANS_DATE
    ,STATUS
    ,TRAN_AMT
    ,CREDIT_AMT
    ,APPLD_AMT
    ,ADJ_AMT
    ,TRANS_USER1
    ,PROCESS_LEVEL
    ,DESCRIPTION
    ,DUE_DATE
    ,OUR_DATE
    ,OUR_TIME
    ,PROCESS_FLAG
    ,ERROR_DESCRIPTION
      FROM data_source_table_name
    #It loads data into the table in Oracle....   
    Insert into oracle_destination_table_name (
    COMPANY,
    CUSTOMER,
    TRANS_TYPE,
    INVOICE,
    TRANS_DATE,
    STATUS,
    TRANS_AMT,
    CREDIT_AMT,
    APPLD_AMT,
    ADJ_AMT,
    TRANS_USER1,
    PROCESS_LEVEL,
    DESCRIPTION,
    DUE_DATE,
    OUR_DATE,
    OUR_TIME,
    PROCESS_FLAG,
    ERROR_DESCRIPTION)
    END;

    CREATE TABLE statements would have been better as MS-SQL and Oracle don't have the same data types.
    OUR_DATE, OUR_TIME will (most likely) be ONE column in Oracle.
    DATABASE LINK
    Personally, I'd just load the data over a database link:
    insert into oracle_destination_table_name ( <column list> )
    select ... <transform data here>
    from data_source_table@mssql_db_link
    As far as creating the database link from Oracle to MS-SQL ... that is for somebody else to answer.
    (most likely you'll need to use an ODBC driver)
    EXTERNAL TABLE
    If the data from MS-SQL is in a CSV file, just use and external table.
    same concept:
    insert into oracle_destination_table_name ( <column list> )
    select ... <transform data here>
    from data_source_external_table
    MK

  • R12.0.04 -Sync responsibility role data into the WF table -affurg02.sql

    Heloo my friend ;
    I try to run the following concurrent requests :
    Sync responsibility role data into the WF table and its gives me error and the erros is :
    Cannot find file /oracle/VIS12/apps/apps_st/appl/fnd/12.0.0/sql/affurg02.sql
    Cause: Application Object Library could not could not locate the file specified.
    Action: Contact your system administrator. Verify that the specified file and
    Concurrent Manager encountered an error while running SQL*Plus for your concurrent request 4585216.
    I didnt find anything in metalink,
    Anyone has idea?
    Helios

    Run "Workflow Directory Services User/Role Validation" concurrent program instead. <<I already did it... the link whihc u send me it doesnt say nothing.. The document say it only
    STEPS TO REPRODUCE THE PROBLEM:
    Navigate > System Administrator > Requests > Run . Select Sync responsibility role data into wf tables program.
    *** 02/19/08 01:59 am ***
    *** 02/19/08 02:00 am ***
    *** 02/19/08 04:09 am *** (CHG: Sta-&gt;30)
    *** 02/19/08 04:09 am ***
    *** 02/19/08 05:50 am *** (CHG: Sta-&gt;11)
    *** 02/19/08 05:50 am ***
    *** 02/19/08 08:44 am *** (CHG: Asg-&gt;NEW OWNER)
    *** 03/06/08 09:34 am *** (CHG: Sta-&gt;30)
    *** 03/06/08 09:34 am ***
    *** 03/16/08 12:31 pm *** (CHG: Sta-&gt;33)
    *** 03/16/08 12:31 pm ***
    *** 03/30/08 10:00 pm *** (CHG: Sta-&gt;92)
    *** 03/30/08 10:00 pm ***
    There is no solution, i found this documentation already but i cant see that
    *** 03/30/08 10:00 pm *** .... i hope u have other idea... i already try what u said me my friend ..
    Helios

  • Error while retrieving data from PL/SQL Table using SELECT st. (Urgent!!!)

    Hi Friends,
    I am using Oracle 8.1.6 Server, & facing problems while retrieving data from a PL/SQL Table:
    CREATE or REPLACE PROCEDURE test_proc IS
    TYPE tP2 is TABLE of varchar2(10); --declared a collection
    dt2 tP2 := tP2('a','b','c');
    i NUMBER(8);
    begin
    SELECT COUNT(*) INTO i FROM TABLE(CAST(dt2 as tP2));
    DBMS_OUTPUT.PUT_LINE('**'||i);
    end;
    While executing the above procedure, I encountered foll. error:
    ERROR at line 1:
    ORA-00600: internal error code, arguments: [15419], [severe error during PL/SQL execution], [], [],
    ORA-06544: PL/SQL: internal error, arguments: [pfrrun.c:pfrbnd1()], [], [], [], [], [], [], []
    ORA-06553: PLS-801: internal error [0]
    Can anyone please help me, where the problem is??
    Is it Possible to retrieve data from PL/SQL TABLE using SELECT statement? & How ?
    Thanks in advance.
    Best Regards,
    Jay Raval.

    Thanks Roger for the Update.
    It means that have to first CREATE TYPE .. TABLE in database then only I can fire a Select statement on that TYPE.
    Actually I wanted to fire a Select statement on the TABLE TYPE, defined & declared in PLSQL stored procedure using DECLARE TYPE .. TABLE & not using CREATE TYPE .. TABLE.
    I was eager to know this, because my organization is reluctant in using CREATE TYPE .. TABLE defined in the database, so I was looking out for another alternative to access PL/SQL TABLE using Select statement without defining it database. It would have been good if I could access a PLSQL TABLE using Select statement Declared locally in the stored procedure.
    Can I summarize that to access a PL/SQL TABLE using SELECT statement, I have to first CREATE TYPE .. TABLE?
    If someone have any other idea on this, please do let me know.
    Thanks a lot for all help.
    Best Regards,
    Jay Raval.
    You have to define a database type...
    create type tP2 is table of varchar2(10)
    CREATE OR REPLACE PROCEDURE TEST_PROC
    IS
    dt2 tP2 := tP2('a','b','c');
    i NUMBER(8);
    begin
    SELECT COUNT(*) INTO i FROM TABLE(CAST (dt2 AS tP2));
    DBMS_OUTPUT.PUT_LINE('**'||i);
    end;
    This will work.
    Roger

  • Select data into deep internal table

    Dear Experts.
    I created a dynamiv deep internal table.
    while selecting data , into the internal table it is giving a dump. saying that deep structure.
    SELECT OBJTY OBJID ARBPL WERKS from crhd
    INTO CORRESPONDING FIELDS OF TABLE <f_tab>
    where WERKS = pr_werks.
    I used the field catalog also.even same error is comming.
    how to get data into deep internal table by select statement.
    Please help me,
    Regards,
    Rahul

    HI,
    Try creating dynamic internal table like:
    Field-symbols: <dyn_table> type standard table,
                                 <dyn_wa>   ,
                                 <dyn_field>.
      Data: dy_table      type ref to data,
                ifc                  type lvc_t_fcat ,
                xfc                 type lvc_s_fcat ,
               Count             type i          ,
               Count1           type i          ,
               Index              type i          ,
               dy_line           type ref to data.
             Data counter   type i.
      Data: line   type string       ,
                List    like table of line.
      Data: idetails           type abap_compdescr_tab,
                   xdetails           type abap_compdescr    .
      Data: ref_table_des type ref to cl_abap_structdescr.
    *Looping at field cat internal table to populate another field cat to be passed
    * In method used below for creating final dynamic internal table
      Loop at fieldcat into fieldcat1.
        Clear xfc.
           Xfc-fieldname            = fieldcat1-fieldname.
           Xfc-datatype              = fieldcat1-datatype.
           Xfc-intlen                    = fieldcat1-intlen.
         Append xfc            to ifc.
      endloop.
    Clear fieldcat1.
    *Method called to create dynamic internal table on the basis of field catalog created above
      Call method cl_alv_table_create=>create_dynamic_table
        Exporting
          it_fieldcatalog = ifc                     u201Cfield catalog appended above
        Importing
          ep_table        = dy_table.            u201CDynamic internal table which will be created
      Assign dy_table->* to <dyn_table>.
    *Create dynamic work area and assign to FS
      Create data dy_line like line of <dyn_table>.
      Assign dy_line->* to <dyn_wa>.
    Then use this dynamic internal table created from above method
    in the Select Query.
    Hope it helps
    Regards
    Mansi

  • How to read a table and transfer the data into an internal table?

    Hello,
    I try to read all the data from a table (all attribute values from a node) and to write these data into an internal table. Any idea how to do this?
    Thanks for any help.

    Hi,
    Check this code.
    Here i creates context one node i.e  flights and attributes are from SFLIGHT table.
    DATA: lo_nd_flights TYPE REF TO if_wd_context_node,
            lo_el_flights TYPE REF TO if_wd_context_element,
            ls_flights TYPE if_main=>element_flights,
            it_flights type if_main=>elements_flights.
    navigate from <CONTEXT> to <FLIGHTS> via lead selection
      lo_nd_flights = wd_context->get_child_node( 'FLIGHTS' ).
    CALL METHOD LO_ND_FLIGHTS->GET_STATIC_ATTRIBUTES_TABLE
      IMPORTING
        TABLE  = it_flights.
    now the table data will be in internal table it_flights.

  • Reading Data from a SQL table to a Logical file on R/3 appl. Server

    Hi All,
    We would like to create Master Data using LSMW (direct Input) with source files from R/3 Application Server.
    I have created files in the'/ tmp/' directory however I do not know how to read data from the SQL table and insert it into the logical file on the R/3 application server.
    I am new to ABAP , please let me know the steps to be done to acheive this .
    Regards
    - Ajay

    Hi,
    You can find lot of information about Datasets in SCN just SEARCH once.
    You can check the code snippet for understanding
    DATA:
    BEGIN OF fs,
      carrid TYPE s_carr_id,
      connid TYPE s_conn_id,
    END OF fs.
    DATA:
      itab    LIKE
              TABLE OF fs,
      w_file  TYPE char255 VALUE 'FILE',
      w_file2 TYPE char255 VALUE 'FILE2'.
    SELECT carrid connid FROM spfli INTO TABLE itab.
    OPEN DATASET w_file FOR OUTPUT IN TEXT MODE ENCODING DEFAULT. "Opening a file in Application
                                                            " Server to write data
    LOOP AT itab INTO fs.
      TRANSFER fs TO w_file. "" Writing the data into the Application server file
    ENDLOOP.
    CLOSE DATASET w_file.
    OPEN DATASET w_file FOR INPUT IN TEXT MODE ENCODING DEFAULT. "Opening a file in Application
                                                          " server to read data
    FREE itab.
    DO.
      READ DATASET w_file INTO fs.
      IF sy-subrc EQ 0.
        APPEND fs TO itab.
        OPEN DATASET w_file2 FOR APPENDING IN TEXT MODE ENCODING DEFAULT. "Appending more data to the file in the
                                                           " application server
        TRANSFER fs TO w_file2.
        CLOSE DATASET w_file2.
      ELSE.
        EXIT.
      ENDIF.
    ENDDO.
    Regards
    Sarves

  • Is it possible to import data into an existing table?

    Hi.. everyone.
    Is it possible to import data into an existing table
    by using import utility?
    The exported table and the existing table have the same name
    and table schema.
    I want to append "new data(exported from oracle8.0.5)" to
    "an existing partitioned-table" by using "oracle 9i import utility".
    Thanks in advance.
    Have a nice day.
    Ho.

    SQL> select index_name
    2 from user_indexes
    3 where table_name = 'IMPORTPK';
    INDEX_NAME
    SYS_C007610
    SQL> create view importpk_view as select * from importpk;
    View created.
    SQL> disconn
    Disconnected from Oracle Database 10g Enterprise Edition Release 10.1.0.2.0 - Pr
    oduction
    With the Partitioning, OLAP and Data Mining options
    SQL> exit
    C:\>exp userid=oracle/oracle tables=importpk
    Export: Release 10.1.0.2.0 - Production on Tue Sep 5 08:30:50 2006
    Copyright (c) 1982, 2004, Oracle. All rights reserved.
    Connected to: Oracle Database 10g Enterprise Edition Release 10.1.0.2.0 - Produc
    tion
    With the Partitioning, OLAP and Data Mining options
    Export done in WE8MSWIN1252 character set and AL16UTF16 NCHAR character set
    About to export specified tables via Conventional Path ...
    . . exporting table IMPORTPK 10 rows exported
    Export terminated successfully without warnings.
    C:\>imp userid=oracle/oracle tables=importpk ignore=y
    Import: Release 10.1.0.2.0 - Production on Tue Sep 5 08:31:12 2006
    Copyright (c) 1982, 2004, Oracle. All rights reserved.
    Connected to: Oracle Database 10g Enterprise Edition Release 10.1.0.2.0 - Produc
    tion
    With the Partitioning, OLAP and Data Mining options
    Export file created by EXPORT:V10.01.00 via conventional path
    import done in WE8MSWIN1252 character set and AL16UTF16 NCHAR character set
    . importing ORACLE's objects into ORACLE
    . . importing table "IMPORTPK"
    IMP-00019: row rejected due to ORACLE error 1
    IMP-00003: ORACLE error 1 encountered
    ORA-00001: unique constraint (ORACLE.SYS_C007610) violated
    Column 1 1
    Import terminated successfully with warnings.
    C:\>sqlplus/nolog
    SQL*Plus: Release 10.1.0.2.0 - Production on Tue Sep 5 08:33:20 2006
    Copyright (c) 1982, 2004, Oracle. All rights reserved.
    1.No
    Note : if table content primary key and index.
    SQL> conn oracle/oracle
    Connected.
    SQL> create table withoutcons ( no number);
    Table created.
    SQL> insert into withoutcons select * from importpk;
    10 rows created.
    SQL> create view withoutcons_view as select * from withoutcons;
    View created.
    SQL> disconn
    Disconnected from Oracle Database 10g Enterprise Edition Release 10.1.0.2.0 - Pr
    oduction
    With the Partitioning, OLAP and Data Mining options
    SQL> exit
    C:\>exp userid=oracle/oracle tables=withoutcons
    Export: Release 10.1.0.2.0 - Production on Tue Sep 5 08:36:05 2006
    Copyright (c) 1982, 2004, Oracle. All rights reserved.
    Connected to: Oracle Database 10g Enterprise Edition Release 10.1.0.2.0 - Produc
    tion
    With the Partitioning, OLAP and Data Mining options
    Export done in WE8MSWIN1252 character set and AL16UTF16 NCHAR character set
    About to export specified tables via Conventional Path ...
    . . exporting table WITHOUTCONS 10 rows exported
    Export terminated successfully without warnings.
    C:\>imp userid=oracle/oracle tables=withoutcons ignore=y
    Import: Release 10.1.0.2.0 - Production on Tue Sep 5 08:37:17 2006
    Copyright (c) 1982, 2004, Oracle. All rights reserved.
    Connected to: Oracle Database 10g Enterprise Edition Release 10.1.0.2.0 - Produc
    tion
    With the Partitioning, OLAP and Data Mining options
    Export file created by EXPORT:V10.01.00 via conventional path
    import done in WE8MSWIN1252 character set and AL16UTF16 NCHAR character set
    . importing ORACLE's objects into ORACLE
    . . importing table "WITHOUTCONS" 10 rows imported
    Import terminated successfully without warnings.
    2. Yes
    If table content no unique constraints
    Message was edited by:
    user526020

  • How to read RMAN data into an ORACLE Table?

    Hallo,
    With regards to RMAN, how should we store the data into a database table, from the commands which can run only on RMAN prompt without using Recovery Catalog?
    For Example:
    RMAN> Report need backup days 3;
    RMAN DATA:
    RMAN-03022: compiling command: report
    Report of files whose recovery needs more than 3 days of archived logs
    File Days Name
    1 1203 D:\ORACLE\ORADATA\TEST\SYSTEM01.DBF
    2 1203 D:\ORACLE\ORADATA\TEST\RBS01.DBF
    3 1203 D:\ORACLE\ORADATA\TEST\USERS01.DBF
    Should it done via UTL_FILE?
    If so, could someone give simple example/code how to do that, in order to write this RMAN data into an Oracle Database table?
    I also set the utl_file_dir parameter to a particular directory in my database.
    Thanks
    W.Benvort

    Actually, I am not using Recovery Catalog, so the views like RC_database, Rc_tablespaces etc , which are specific to recovery catalog are not available.
    r.- this make sense at 100% because those views belong to the recovery catalog.
    So, I wanted that these information, which we can get via using the commands like above, transfer into an Oracle table
    r.- If you want to access the views of the Recovery Catalog to store part of that information in tables you have to have the database registered in a Recovery Catalog.
    Should we keep the Recovery Catalog in Control file? Instead of using separate Schema.
    r.- I recommend you to create a catalog for your database because the space the controlfile to store information regarding RMAN is reused and you can lose important information about your backups.
    Can we run Catrman.sql script as a sys in order to keep the recovery catalog in sys schema?
    r.- As you know, this is not recommended at all.
    Conclusion : Create a Recovery Catalog and you will be able to perform all that you want regardind what you mentioned above.
    I have a thread for this:
    RMAN ( CATALOG CREATION ) STEP BY STEP by Joel Pérez
    Joel Pérez
    http://otn.oracle.com/experts

  • Import Excel File Data into oracle database table.

    HI,
    i want to insert data into a specific table from a excel file. please help me..
    for example
    emp.xls file's data need to be import in emp database table.
    thanks in advance...

    Hi,
    to all knowledgable person, this would be gald for u all that i have solved the problem.
    through this procedure..
    PROCEDURE IMPORT_FROM_EXCEL_PROC (as_FileName VARCHAR2, exe_name varchar2) IS
              appid PLS_INTEGER;
              convid PLS_INTEGER;
              docid PLS_INTEGER;
              conv_established BOOLEAN := FALSE;
              buffer VARCHAR2(100);      
              Emp_code VARCHAR2(100);
              Emp_name VARCHAR2(100);
              Emp_desig VARCHAR2(100);
              Emp_Salary VARCHAR2(100);
              ls_error VARCHAR2(1000);
              li_row integer;
              li_col integer;
              li_error_count integer;
              li_load_count integer;
    BEGIN
         --Start Excel
         --This line assumes that Excel is in the specified directory
              --     APPID := DDE.APP_BEGIN('D:\OFFICE11\EXCEL.EXE',DDE.APP_MODE_MINIMIZED);
              APPID := DDE.APP_BEGIN(exe_name,DDE.APP_MODE_MINIMIZED);
         --Establish a conversation with Excel
         --The following loop will not end until a conversation with Excel
         --has been established. Therefore, it can result in a endless loop,
         --so use with caution.
              WHILE NOT conv_established LOOP
              BEGIN
              convid := DDE.INITIATE('excel', 'system');
              conv_established := TRUE;
              EXCEPTION
              WHEN DDE.DMLERR_NO_CONV_ESTABLISHED THEN
              conv_established := FALSE;
              END;
              END LOOP;
         --Open Excel document
         --This assumes that you have an Excel spreadsheet named ddetest.xls in the root of c:
              DDE.EXECUTE(convid, '[Open("'||as_FileName||'")]', 10000);     
         --Initiate conversation with Excel document
              docid := DDE.INITIATE('excel',as_FileName);
         --Begin transfer from Excel to Forms
                   li_load_count := 0;
                   li_error_count := 0;
                   li_col := 1;
                   li_row := 2;
                   GO_BLOCK('IMPORT_XLS');          
                   DDE.REQUEST (docid, 'R' || TO_CHAR(li_row) || 'C' || TO_CHAR(li_col), buffer, DDE.CF_TEXT, 1000);          
                   WHILE length(buffer) > 2 LOOP           
                   WHILE li_col < 5 LOOP
                        buffer := substr(buffer, 1, instr(buffer, chr(10)) - 2);               
                   IF li_col = 1 THEN --Emp_code
                        Emp_code := buffer;     
                   ELSIF li_col = 2 THEN --Emp_name     
                        Emp_name := buffer;     
                   ELSIF li_col = 3 THEN --Emp_desig      
                        Emp_desig := buffer;     
                   ELSE --Emp_salary
                        Emp_salary := buffer;
                   END IF;
                   IF nvl(ls_error,'N') = 'N' THEN
                   li_col := li_col + 1;
                   DDE.REQUEST (docid, 'R' || TO_CHAR(li_row) || 'C' || TO_CHAR(li_col), buffer, DDE.CF_TEXT, 1000);
                   ELSE
                   li_col := 5;
                   END IF;               
                   END LOOP;
                   IF nvl(ls_error, 'N') = 'N' THEN
                   li_load_count := li_load_count + 1;
                   IF li_load_count = 1 THEN
                   FIRST_RECORD;
                   ELSE
                   NEXT_RECORD;
                   END IF;
                   :IMPORT_XLS.Emp_code := Emp_code;               
                   :IMPORT_XLS.Emp_name := Emp_name;          
                   :IMPORT_XLS.Emp_desig := Emp_desig;
                   :IMPORT_XLS.Emp_salary := Emp_salary;
                   ELSE
                   li_error_count := li_error_count + 1;
                   DDE.POKE(docid, 'R' || TO_CHAR(li_row) || 'C5', ls_error, DDE.CF_TEXT, 10000);
                   END IF;
                   ls_error := '';
                   Emp_code := '';
                   Emp_name := '';
                   Emp_desig := '';
                   Emp_salary := '';
                   li_col := 1;
                   li_row := li_row + 1;
                   DDE.REQUEST (docid, 'R' || TO_CHAR(li_row) || 'C' || TO_CHAR(li_col), buffer, DDE.CF_TEXT, 1000);                
                   END LOOP;               
                   IF li_error_count > 0 THEN
                        DDE.EXECUTE(convid, '[[save]]', 10000);
                        Message(TO_CHAR(li_load_count) || ' Record(s) Loaded. ' ||
                        TO_CHAR(li_error_count) || ' Invalid Record(s). See error in excel file.');
                        ELSE
                        Message(TO_CHAR(li_load_count) || ' Record(s) Successfully Loaded.');
                   END IF;                
                   --End transfer to Excel
                   DDE.TERMINATE(docid);
                   DDE.TERMINATE(convid);
                   DDE.APP_END(appid);                          
                   --Handle exceptions
                   EXCEPTION
                   WHEN DDE.DDE_APP_FAILURE THEN
                   MESSAGE('WINDOWS APPLICATION CANNOT START.');
                   WHEN DDE.DDE_PARAM_ERR THEN
                   MESSAGE('A NULL VALUE WAS PASSED TO DDE');
                   WHEN DDE.DMLERR_NO_CONV_ESTABLISHED THEN
                   MESSAGE('DDE CANNOT ESTABLISH A CONVERSATION');
                   WHEN DDE.DMLERR_NOTPROCESSED THEN
                   MESSAGE('A TRANSACTION FAILED');
    END;

  • How to insert chinese data into MS SQL Server 2000 through JDBC

    I am trying to insert chinese data into MS SQL server 2000 using JDBC. how to do this?
    can anybody help me.
    thanx.

    I am trying to insert chinese data into MS SQL server 2000 using JDBC. how to do this?
    can anybody help me.
    thanx.

Maybe you are looking for

  • 7th Gen iPod Nano shuts off randomly

    My iPod Nano is just about my favourite piece of hardware that I've ever bought from apple. I'm primarily a pc user when it comes to computers, and having a basic, small iPod means I can listen to music and podcasts and leave the more complicated tas

  • Error message when printing Sales Order

    Hi, I get following error message when printing out a sales order just created. No matching records found 'Document' (RDOC) (ODBC-2028) (Message 131-183) Logged in as super-user, posting periods is unlocked. It is a new company just created. With san

  • Macbook Pro Tiger to Macbook Pro Leopard

    I just purchased a new MBP with Leopard and need to move my itunes library and iphoto library from my Tiger MBP to my Leopard MBP. Everything else will be re-installed. I really don't have that much installed and I have the dmg's backed up so re-inst

  • Problem With my E72 with invalid lock code

    Hi, I just configured a new exchange mail account. Prior to that I have configured a my previous firm mail exchange. I forgot the passcode. After setting up new account it asked for the lock code and i tried many time which reulted in data loss. I lo

  • How to configure TAF on RAC 10g

    Hi, I am facing issue with TAF over jdbc client. I have created the jdbc client (HelloWorld java program) to test TAF. The following is my jdbc url: "jdbc:oracle:thin:@(DESCRIPTION = (LOAD_BALANCE=on)(FAILOVER=on)(ADDRESS_LIST= (ADDRESS=(PROTOCOL=TCP