How to read clob data into a table

Hi we have application which take oracle reports(10G)  xml  file as input and runs the report and save the output(csv,pdf) in a table.
so i need some idea to impliment the follwoin task .
I need to read the  content of the out file whcih in table stored in CLOB(I have not checked yet) column and store the data into another table .
FYI: The out put  of the report will have 10+ different column.
could Some please point me to the right direction  to acomplis h the task .
Thnaks In Advance.Edited by: 852112 on Apr 13, 2011 10:47 AM

Welcome to the forum.
See:
http://www.oracle-base.com/articles/8i/ImportClob.php
http://www.oracle-base.com/articles/8i/ImportBlob.php

Similar Messages

  • How to insert  Legacy data into QP_RLTD_MODIFIERS table?

    How to insert  Legacy data into QP_RLTD_MODIFIERS table in R12 instance.

    I would use the API QP_Modifiers_PUB.Process_Modifiers for pushing legacy pricing data into R12.  QP_RLTD_MODIFIERS is only used for certain types of discounts (in my prod environnment, only promos have data in this table).

  • How to import legacy data into apex tables

    Hi All,
    Please tell me How to import legacy data into apex tables.
    Thanks&Regards,
    Raghu

    SQL WorkshopUtilitiesData Workshop...
    you can import the data from already exported as (text/csv/xml) data
    Note: the table name and column name should be equal if the table already Existing table.

  • Need help in stroring CLOB data into a table

    Hi All,
    I have a CLOB data. Which contains delimited data.
    Example:
    "111#|#ABC#|#asfsdffgh $|$222#|#XYZ#|#jdsfgdskdsf $|$"
    #|# - is column delimiter.
    $|$ - is row delimiter
    I want to extract and store the above data into a table which has 3 columns. Need help.
    I have Oracle Database 11g Enterprise Edition Release 11.1.0.6.0 - 64bit Production
    Thanks in advance,
    Girish G

    Hi Girish,
    Please go through the below url's...It will give you fair idea and solution. HOpe you know the sql *loader utility. or external table.
    http://www.oracle-base.com/articles/10g/LoadLobDataUsingSqlLoader.php
    http://www.oracle-base.com/articles/10g/ExternalTablesContainingLobData.php
    KPR.

  • How to load text data into internal table

    I have a text file to load txt data into internal table. So how to read text data with validation and to load all text data into the internal table?
    Say this is the text file:
    IO_NAME, IO_TYPE, IO_SHTXT, IO_LONGTEXT, DATATYPE, DATA LENGTH
    ZIO_TEST1, CHA,      IO TEST1,      IO TEST 1,        CHAR,         20
    ZIO_TEST2, CHA,      IO TEST2,      IO TEST 2,        CHAR,         20
    Regards,
    Mau

    Hi,
    U can use GUI_UPLOAD for this...
    Declare an internal table like
    data: begin of itab occurs 0,
    string(1200),
    end of itab.
    check the sample code:
    cange as you need
    DATA: DATEI_PC TYPE STRING VALUE 'C:\MATNR.TXT'.
    DATA: BEGIN OF ITAB occurs 0,
    TXT(1024),
    END OF ITAB.
    CALL METHOD CL_GUI_FRONTEND_SERVICES=>GUI_UPLOAD
    EXPORTING
    FILENAME = DATEI_PC
    FILETYPE = 'ASC'
    CHANGING
    DATA_TAB = ITAB[]
    EXCEPTIONS
    FILE_OPEN_ERROR = 1
    FILE_READ_ERROR = 2
    NO_BATCH = 3
    GUI_REFUSE_FILETRANSFER = 4
    INVALID_TYPE = 5
    NO_AUTHORITY = 6
    UNKNOWN_ERROR = 7
    BAD_DATA_FORMAT = 8
    HEADER_NOT_ALLOWED = 9
    SEPARATOR_NOT_ALLOWED = 10
    HEADER_TOO_LONG = 11
    UNKNOWN_DP_ERROR = 12
    ACCESS_DENIED = 13
    DP_OUT_OF_MEMORY = 14
    DISK_FULL = 15
    DP_TIMEOUT = 16
    NOT_SUPPORTED_BY_GUI = 17
    ERROR_NO_GUI = 18
    OTHERS = 19.
    IF SY-SUBRC NE 0. WRITE: / 'Error in Uploading'. STOP. ENDIF.
    WRITE: / 'UPLOAD:'.
    LOOP AT ITAB. WRITE: / ITAB-TXT. ENDLOOP.

  • How to insert/Update date into Dictionary Table?

    Dear Experts,
    I have created a Dictionary Project and Deployed.I think the table had created in portal database.
    now i want to insert some data into that table?
    Can you plz tell me how to access the table using Abstract Portal Component using DynPage.
    Waiting for ur replies...
    Thanks and Regards,
    Visweswar.

    Hi
    Can u share the Logic???

  • How to insert text data into temp tables....

    Dear All,
    I have one notepad with three columns, first column is segment1, second column is segment2 & third column is price list....
    and there is no delimiter and exact spaces..(i.e, zizak fomat)
    Ex:-
    xx yy 00009999
    kk mmmm 00009333
    Data is available like above example...So, I need to insert this data into one table.(2LAKSHS OF RECORDS AVAILABLE IN THAT NOTEPAD)
    So, Any can one help me, how to insert this kind of text data into temparory table...
    Regards
    Krishna
    Edited by: user12070109 on May 29, 2010 9:48 PM
    Edited by: user12070109 on May 29, 2010 9:49 PM

    Hello,
    What manu suggested this can be done through oracle forms.
    If as i read your last post you are using that in database it will not work in db. Try to use the same process in oracle forms will work by making some changes.
    And if you don't want to use forms then there is one way using SQL LOADER. It required control file to execute for uploading data.
    See the below link.
    http://www.orafaq.com/wiki/SQL*Loader_FAQ
    In this example its showing filename.csv you can use your file name like yourfilename.txt.
    So your control file will look like this...
    load data
    infile 'file_path\file_name.txt'
    into table table_name  -- use actual table name where you want to upload data
    fields terminated by " "  -- Here using spaces as you mentioned           
    (column1, column2, column3)  -- Here use the three column names of tableAnd after creating control file with the above code. You can call it in command prompt like this
    sqlldr username/password control=control_file_path\control_file_name.ctl log=log_file_path\log_file_name.log
    or
    sqlldr username/password@dbconnection control=control_file_path\control_file_name.ctl log=log_file_path\log_file_name.log
    Before doing this practice make sure SQLLDR.exe availabe in the machine where you have to execute. Otherwise you will have to install db client for using sqlldr.exe
    -Ammad

  • How to store XML data into Oracle Table

    I had trouble to store XML data into Oracle Table with XDK (Oracle 8.1.7 ). The error is:
    C:\XDK_Java_9_2\xdk\demo\java\Test>java testInsert Dept.xml
    <Line 1, Column 1>: XML-0108: (Fatal Error) Start of root element expected.
    Exception in thread "main" oracle.xml.sql.OracleXMLSQLException: Start of root element expected.
    at oracle.xml.sql.dml.OracleXMLSave.saveXML(OracleXMLSave.java:2263)
    at oracle.xml.sql.dml.OracleXMLSave.insertXML(OracleXMLSave.java:1333)
    at testInsert.main(testInsert.java:8)
    Here is my xml file:
    <?xml version = '1.0'?>
    <ROWSET>
    <ROW num="1">
    <DEPTNO>10</DEPTNO>
    <DNAME>ACCOUNTING</DNAME>
    <LOC>NEW YORK</LOC>
    </ROW>
    <ROW num="2">
    <DEPTNO>20</DEPTNO>
    <DNAME>RESEARCH</DNAME>
    <LOC>DALLAS</LOC>
    </ROW>
    <ROW num="3">
    <DEPTNO>30</DEPTNO>
    <DNAME>SALES</DNAME>
    <LOC>CHICAGO</LOC>
    </ROW>
    <ROW num="4">
    <DEPTNO>40</DEPTNO>
    <DNAME>OPERATIONS</DNAME>
    <LOC>BOSTON</LOC>
    </ROW>
    </ROWSET>
    and here is structure of table:
    Name Null? Type
    DEPTNO NOT NULL NUMBER(2)
    DNAME VARCHAR2(14)
    LOC VARCHAR2(13)
    and here is my Java Code:
    import java.sql.*;
    import oracle.xml.sql.dml.OracleXMLSave;
    public class testInsert{
         public static void main(String[] args) throws SQLException{
              Connection conn = getConnection();
              OracleXMLSave sav = new OracleXMLSave(conn,"scott.tmp_dept");
              sav.insertXML(args[0]);
              sav.close();
              conn.close();
         private static Connection getConnection()throws SQLException{
              DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver());
              Connection conn = DriverManager.getConnection("jdbc:oracle:thin:@amt-ebdev01:1521:mydept","scott","tiger");
              return conn;
    Could you help me ? Thanks !

    The problem is that you need to pass avalid URL , Document...
    Please try this code instead:
    import java.net.*;
    import java.sql.*;
    import java.io.*;
    import oracle.xml.sql.dml.OracleXMLSave;
    public class testInsert
    public static void main(String[] args) throws SQLException{
    Connection conn = getConnection();
    OracleXMLSave sav = new OracleXMLSave(conn,"scott.temp_dept");
    URL url = createURL(args[0]);
    sav.insertXML(url);
    sav.close();
    conn.close();
    private static Connection getConnection()throws SQLException{
    DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver());
    Connection conn = DriverManager.getConnection("jdbc:oracle:thin:@dlsun1982:1521:jwxdk9i","scott","tiger");
    return conn;
    // Helper method to create a URL from a file name
    static URL createURL(String fileName)
    URL url = null;
    try
    url = new URL(fileName);
    catch (MalformedURLException ex)
    File f = new File(fileName);
    try
    String path = f.getAbsolutePath();
    // This is a bunch of weird code that is required to
    // make a valid URL on the Windows platform, due
    // to inconsistencies in what getAbsolutePath returns.
    String fs = System.getProperty("file.separator");
    if (fs.length() == 1)
    char sep = fs.charAt(0);
    if (sep != '/')
    path = path.replace(sep, '/');
    if (path.charAt(0) != '/')
    path = '/' + path;
    path = "file://" + path;
    url = new URL(path);
    catch (MalformedURLException e)
    System.out.println("Cannot create url for: " + fileName);
    System.exit(0);
    return url;

  • How to maintain the data  into database table

    Hi,
    experts,
    how to maintain the data  into database table

    There are several ways to maintain data in the database
    1. Use table maintanance generator . You can create this using SE11 and data can be edited through SM30.
    2. Loginto  SE11 with the specified table and check the ATTRIBUTES tab. There you can set some parameters for maintaining the database. When you set Maintain database, you edit the data thorugh SE11 it self
    3. Through Se16 as well.
    4. A small abap program can do the above task as well.
    Thanks,
    Raj
    Edited by: Rajanya Kolavennu on Feb 5, 2008 8:33 PM

  • 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

  • How to load xml data into a table

    Hi,
    i am a newbie. I want to insert the data of xml file into a table. I am doing this using XSU api for java.
    I am using oracle 9i and jdk 1.7.
    I am using OracleXmlSave class.
    but i am getting following error.
    java.lang.NoClassDefFoundError: oracle/jdbc2/Clob
    Please help in this regard. this is my first thread.
    thanks.
    Edited by: 979682 on Jan 3, 2013 3:39 AM

    Hi,
    You can insert XML data from XML file to Oracle database by this script :
    Hi,
    For reading and inserting the data from XML file to Oracle Database :
    1. CREATE A BLANK TABLE with same structure as XML file :
    select * from xml_test
    2. SELECT QUERY DIRECTLY ON XML FILE :
    SELECT XMLTYPE(bfilename('TEST_DIR', 'data_file.xml'), nls_charset_id('UTF8')) xml_data FROM dual
    3. CREATE ORACLE DIRECTORY AND PLACE XML FILE IN THIS DIRECTORY LOCATION:
    --CREATE DIRECTORY TEST_DIR as '/oracle/test';
    --grant all on directory TEST_DIR to public;
    4. INSERT THE XML DATA IN ORACLE TABLE:
    INSERT INTO xml_test(column1,coumn2)
    WITH t AS (SELECT XMLTYPE(bfilename('TEST_DIR', 'attachment.xml'), nls_charset_id('UTF8')) xml_col FROM dual)
    SELECT
    extractValue(value(x),'/ROW/COLUMN1') column1
    ,extractValue(value(x),'ROW/COLUMN2') column2
    FROM t,TABLE(XMLSequence(extract(t.xml_col,'/ROWSET/ROW'))) x;
    I have assumed a table with 2 columns.
    Regards,
    Rohit Chaudhari
    [email protected]

  • How to get editable data into internal table

    Hi ABAPers,
    I am displaying REUSE_ALV_GRID_DISPLAY report with one editable field and i have post button in report. Once i select post button i need to get editable data to internal table which i passed to REUSE_ALV_GRID_DISPLAY.
    actually i am writing below code but data is not coming to internal table.
      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
       EXPORTING
         i_callback_program                          =  sy-repid
         i_callback_pf_status_set                  = 'PF-STATUS'
         i_callback_user_command               = 'USER_COMMAND '
         it_fieldcat                                        = t_field[]
         i_default                                          = 'X'
        TABLES
          t_outtab                          =   <fs_display1>.       "t_display
    FORM user_command USING g_ucomm LIKE sy-ucomm
                   rs_selfield TYPE slis_selfield.
      g_test1 = g_ucomm.
      CASE g_ucomm.
        WHEN 'POST'.
          READ TABLE <fs_display1> ASSIGNING <fsw_display1> INDEX 1.    "Just for testing index 1
          IF sy-subrc = 0.
            w_display = <fsw_display1>.
            APPEND w_display TO t_display.
            CLEAR : w_display.
          ENDIF.
          PERFORM v1.
          PERFORM bapi_call.
      ENDCASE.
    ENDFORM.                    "USER_COMMAND
    Please help me how to get.
    Regards,
    Raju.

    Hi,
    Try the following:
    CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
    EXPORTING
    i_callback_program = sy-repid
    i_callback_pf_status_set = 'PF-STATUS'
    i_callback_user_command = 'USER_COMMAND '
    it_fieldcat = t_field[]
    i_default = 'X'
    TABLES
    t_outtab = <fs_display1>. "t_display
    FORM user_command USING g_ucomm LIKE sy-ucomm
    rs_selfield TYPE slis_selfield.
    g_test1 = g_ucomm.
    CASE g_ucomm.
    WHEN 'POST'.
    * to reflect the data changed into internal table
          DATA : ref_grid TYPE REF TO cl_gui_alv_grid. "new
          IF ref_grid IS INITIAL.
            CALL FUNCTION 'GET_GLOBALS_FROM_SLVC_FULLSCR'
              IMPORTING
                e_grid = ref_grid.
          ENDIF.
          IF NOT ref_grid IS INITIAL.
            CALL METHOD ref_grid->check_changed_data.
          ENDIF.
    READ TABLE <fs_display1> ASSIGNING <fsw_display1> INDEX 1. "Just for testing index 1
    IF sy-subrc = 0.
    w_display = <fsw_display1>.
    APPEND w_display TO t_display.
    CLEAR : w_display.
    ENDIF.
    PERFORM v1.
    PERFORM bapi_call.
    ENDCASE.
    ENDFORM. "USER_COMMAND
    Hope it helps.
    Regards,
    Gilberto Li

  • Error inserting CLOB data into xmltype table on Solaris 8 Oracle 9.2.0.1.0

    Hi all,
    I have a table t of type xmltype.
    I have a function getData which parses an XML file and returns the CLOB data.
    I have a statement as
    "insert into t values(xmltype(getData('abc.xml')));"
    I get the following error
    ERROR at line 1:
    ORA-00600: internal error code, arguments: [17177], [0x0], [], [], [], [], [],
    ORA-31011: XML parsing failed
    ORA-06512: at "SYS.XMLTYPE", line 0
    ORA-06512: at line 1
    ORA-06512: at "ADAPT.AP_CREATE_INSP_LOAD", line 57
    ORA-06512: at line 1
    At line 57 I have the above mentioned "insert into..." statement.
    Can anybody tell me what can be the problem.
    Interestingly enough, the same things work on same Oracle version on Windows 2k, Windows 2k3, another Solaris 8 machine.
    Please help asap as I am in fire fighting mode.
    Thanks & Regards,
    Aniruddha Deshpande

    Hi Aniruddha
    I think you need to post to a db forum rather than XMLP.
    Tim

  • How to load excel data into oracle table

    How do i load data from an excel file with several worksheets into an oracle table?
    using Oracle 10g
    Excel
    sample data of excel
    Name eric Name mary
    AccountNo 123 AccountNo 321
    amount1 5.0 Amount1 1.0
    amount2 5.5 Amount2 2.0
    amount3 6.0 Amount3 3.0
    Total 16.5 Total 6.0
    Name larry Name beth
    AccountNo 123 AccountNo 321
    amount1 5.0 Amount1 1.0
    amount2 5.5 Amount2 2.0
    amount3 6.0 Amount3 3.0
    Total 16.5 Total 6.0
    Note: Assume data are aligned into columns like a real excel workbook

    I have some used something like this.
    don't ask any details as I am not a xl person, but i think its pretty straight forword.
    hope its helpful for you or someone else
    Dim i As Integer
    Dim conn As New ADODB.Connection
    Dim strInsert As String
    Dim strExecInsert As String
    conn.ConnectionString = "Provider=MSDAORA.1;User ID=scott;password=tiger;Data Source=orcl.world;Persist Security Info=False"
    conn.Open
    strInsert = "insert into xlsc ( emp, dept, doj," & _
    "dol, dob, Ce ,ED, v_date ) values("
    'this is to insert first 2347 rows from xl to orcl
    While i < 2348
    strExecInsert = strInsert & "'" & _
    Trim(Cells(i, 1).Value) & "','" & _
    Trim(Cells(i, 2).Value) & "','" & _
    Trim(Cells(i, 3).Value) & "','" & _
    Trim(Cells(i, 4).Value) & "','" & _
    Trim(Cells(i, 5).Value) & "','" & _
    Trim(Cells(i, 6).Value) & "','" & _
    Trim(Cells(i, 7).Value) & "','" & _
    Trim(Cells(i, 8).Value) & "' )"
    'MsgBox strExecInsert
    If Cells(i, 1).Value <> "" Then
    conn.Execute (strExecInsert)
    End If
    i = i + 1
    Wend
    'conn.Execute ("commit")
    conn.Close
    End Sub

  • Trying to insert CLOB data into Remote Table..

    Hi everyone,
    I think this question had already posted.But i am not able to figure out this problem..
    what i am trying to do is
    I have a table in the remote database with a CLOB column like this
    REMOTE_TABLE
    ============
    REMOTE_TABLE_ID (Populated with sequence)
    REMOTE_CLOB CLOB
    In my Local database i have to write a Procedure to gather some information on a particular record (My Requirement) and save that CLOB in the REMOTE_TABLE.
    I built that procedure like this
    Declare
    var_clob CLOB; /* I need to processs several records and keep all data in a clob
    begin
    /***** Processed several records in a local database and stored in the variable var_clob which i need to insert into remote database ****/
    Insert into remote_table@remote values (remote_table_seq.nextval,var_clob);
    /*** when i try to execute the above command i am getting the following error
    ORA-06550: line 6, column 105:
    PL/SQL: ORA-22992: cannot use LOB locators selected from remote tables
    ORA-06550: line 6, column 1:
    PL/SQL: SQL Statement ignored *****/
    /***For a test i created the same table in local db****/
    Insert into local_table values (local_table_seq.nextval,var_clob);
    It is working fine and i am able to see the entire CLOB what i want.
    surprisingly if i pass some value instead of a varibale to the remote table like the following..
    Insert into remote_table@remote values (remote_table_seq.nextval,'Hiiiiiiiii');
    It is working fine...
    I tried the following too..
    decalre
    var_clob clob;
    begin
    var_clob := 'Hiiiiiiiiiiiiiii';
    Insert into remote_table@remote (remote_table_id) values (1);
    commit;
    update remote_table@remote set remote_clob = var_clob where remote_table_id = 1;
    commit;
    end
    I am getting the following error..
    ORA-22922: nonexistent LOB value
    ORA-02063: preceding line from CARDIO
    ORA-06512: at line 6
    Could someone please help me in fixing this issue..I need to process all the data to a variable like var_clob and insert that clob into remote table..
    Thanks in advance..
    phani

    Go to http://asktom.oracle.com and search for clob remote table
    also docs contain quite lot of info:
    http://download.oracle.com/docs/cd/B19306_01/appdev.102/b14249/adlob_working.htm#sthref97
    Gints Plivna
    http://www.gplivna.eu

Maybe you are looking for

  • 902: DefaultConnectionStrategy is disconnecting an application module conne

    Very odd exception from BC4J 902 We have 4 ears deployed to this appserver, hot deploy happens most days for all 4 deployed ears. There's common classes deployed in all ears. Some times we see class cast exe's but that may be another issue. We've not

  • Deleted files automatically return

    Hi there, I have a strange problem. Somehow when I delete a collection of .torrent files (and empty secure my trash), after a while the deleted files 'automatically' return in my movies-folder. I want them deleted... What can cause this problem? It d

  • Disk mounting/ejecting problems... ESPECIALLY FireWire

    Ever since upgrading to Leopard my 3 Lacie external drives have been VERY wonky. I've tried a FireWire hub, as well as daisy-chaining them via FW800 (they're the triple interface kind), but getting more than one to mount is always a crap shoot. I've

  • About log4j and java

    I have following code in log4j, but after execution I am unable to find file "resultFil" anywhere. appender name="resultFile" class="org.apache.log4j.RollingFileAppender"> <param name="file" value="result.log"/> <param name="MaxFileSize" value="100KB

  • Triggering and reading on two HP/Agilent 34401A DMMs at same time

    Hi folks, I'm VERY new to LabVIEW and need some help with a measurement.  I'm using LV 8.2 with all equipment on GPIB.  I have two 34401A multimeters, triggered externally using an HP 33120A function generator.   I've downloaded the example vi's and