Extracting clob/blob/long datatypes in delimited file

I have a few tables in database that have clob/blob/long datatypes. I need to unload this data into delimited file and reload the data into another database. I don't want to use export/import.
Currently the code that i have can handle varchar2, number, date datatypes quite easily using sqlloader.
The tables are not too big (hundred to 10k rows approximately) and performance is important but not crucial. The script can run for a few minutes unloading data, that is fine. Code maintenance is of higher priority with pl/sql being the preferred scripting language.
From the sqlloader manual, i glean that use of special delimiter is important, something like <startlob> and <endlob> .
I need ideas on how to do this.

Hi Buddy.
I am having same kind of Problem. I am using very similar procedure Instead of PUT_RAW I am using put line.
Writing is not a problem after writing the image into a file I cannot open that. That means Image got corrupted. If you find out some solutions for your problem please help me
My email id is [email protected]
Thanks
AJI

Similar Messages

  • CLOB and LONG datatypes

    I have a problem with needing to display fields in a report that are stored in the database as CLOB.
    The report isn't too complicated, and can be put together using folders in Admin.
    There is a table in the database that stores text from reports. Each report is identified by its case id, and then there may be a number of reports for each case (let's say 1-5 for the purposes of this explaination). There will then be three sections of text in each report, identifed in the database by section numbers.
    The fields needed are the case number (case_id), the report number (report_no), the section number (sect_no) and the section text (sect_text)
    All of the fields are numeric, except sect_text, which is a CLOB datatype.
    There are two queries, one to select the case id, min report number and first section of text and the other to select the case id, max report number and last section of text. The aim being a report that shows the start of the first report and the end of the last one.
    So, that's the background. All of the queries to select the data work fine in sqlplus. However they can't be displayed in Disco because it brings in CLOB fields as LONG, and can't group them (which it has to do for the MAX and MIN)
    I'd rather not set the whole thing up as a view on the DB, as I'd prefer to have the flexibiility of editing it in discoverer
    Any tips?

    Hi
    I do have a tip. Please take a look at this thread that I was involved in a couple of years ago:
    CLOB show up as item
    And here is another one that might help:
    Possible for Discoverer to display BLOB type documents stored in database?
    Best wishes
    Michael

  • Export CLOB field (long= 4202083) to a file with UTL_FILE.PUT or PUT_LINE

    Hello,
    I'm trying to export a CLOB field to a txt file. It's a xml string in the CLOB. I have used different methods but the only which i can use is PUT, PUT_LINE.
    But:
    - PUT does only export the 32565 characters. I see that the output of l_pos is 4202084 but these are not exported. I have tried FFLUSH, but this gives a error or my syntax is not correct.
    - PUT_LINE is exporting the complete CLOB, but after every 32656 is new line is added and if I want to look with altove then I have to remove 129 times the new line. Thats not the way I want to go.
    Is it an idea, if it is possible, that I write 32565 chars to the buffer (file), read these 32565 from the buffer minus one (=without \r\n), delete the last 32565 chars from buffer and append/put the chars 32565 minus the \r\n to the buffer again. I hope there will be a better idea but....
    Has anybody an idea how I can solve this? Or what do I wrong?
    Any help would be appreciated.
    Beneath my code.
    Nico
    CREATE OR REPLACE DIRECTORY documents AS 'D:\TEST';
    SET SERVEROUTPUT ON
    DECLARE
      l_file    UTL_FILE.FILE_TYPE;
      l_clob    CLOB;
      l_buffer  VARCHAR2(32767);
      l_amount  BINARY_INTEGER := 32565;
      l_pos     INTEGER := 1;
      l_lengte  number;
      l_lineCount number := 0;
    BEGIN
      SELECT PAYLOAD
      INTO   l_clob
      FROM   icepayloadext ext
      WHERE  EXT.PAYLOADTYPE in ('POST')
        AND  substr(payload, 0, 2000) like '%181015%'
        AND  ext.LSTIME between to_date('10-10-2012 00:00:00', 'dd-mm-rrrr HH24:mi:ss') and to_date('10-10-2012 17:30:00', 'dd-mm-rrrr HH24:mi:ss');
      l_lengte := DBMS_LOB.GETLENGTH (l_clob);
      DBMS_OUTPUT.PUT_LINE('lengte clob veld: ' || l_lengte);
      l_file := UTL_FILE.fopen('DOCUMENTS', 'Sample1.txt', 'w', 32767);
      LOOP
        DBMS_LOB.read (l_clob, l_amount, l_pos, l_buffer);
        UTL_FILE.PUT(l_file, l_buffer);
        UTL_FILE.FFLUSH (l_file);
        --UTL_FILE.PUT_LINE(l_file,'alles geschreven');
        l_pos := l_pos + l_amount;
        DBMS_OUTPUT.PUT_LINE('Offset position: ' || l_pos);
        if (l_pos > l_lengte) then
            exit;
        end if;
      END LOOP;
      UTL_FILE.fclose(l_file);
    --EXCEPTION
      --WHEN OTHERS THEN
      --  DBMS_OUTPUT.put_line(SQLERRM);
        --UTL_FILE.fclose(l_file);
    END;
    /

    You can always try it the binary way:
    DECLARE
      l_file UTL_FILE.FILE_TYPE;
      l_clob CLOB;
      l_buffer VARCHAR2(32767);
      l_amount BINARY_INTEGER := 32565;
      l_pos INTEGER := 1;
      l_lengte number;
      l_lineCount number := 0;
    BEGIN
      l_clob := rpad( to_clob( 'test' ), 60000, 'test' );
      l_lengte := DBMS_LOB.GETLENGTH (l_clob);
    DBMS_OUTPUT.PUT_LINE('lengte clob veld: ' || l_lengte);
      l_file := UTL_FILE.fopen( 'MY_DIR', 'Sample1.txt', 'wb', 32767 );
      LOOP
        begin
          DBMS_LOB.read (l_clob, l_amount, l_pos, l_buffer);
        exception
          when no_data_found then exit;
        end;
    --    UTL_FILE.PUT_RAW( l_file, utl_raw.cast_to_raw( l_buffer ) ); -- file in database character set
        UTL_FILE.PUT_RAW( l_file, utl_i18n.string_to_raw( l_buffer, 'WE8MSWIN1252' ) );
        l_pos := l_pos + l_amount;
    DBMS_OUTPUT.PUT_LINE('Offset position: ' || l_pos);
      END LOOP;
      UTL_FILE.fclose(l_file);
    END;Anton

  • How to create a table with datatype blob and insert a pdf file (ravi)

    how to create a table with datatype blob and insert a pdf file,
    give me the explain asap
    1.create the table?
    2.insert the pdffiles into tables?
    3.how to view the files?
    Thanks & Regards
    ravikumar.k
    Edited by: 895044 on Dec 5, 2011 2:55 AM

    895044 wrote:
    how to create a table with datatype blob and insert a pdf file,
    give me the explain asapPerhaps you should read...
    {message:id=9360002}
    especially point 2.
    We're not just sitting here waiting to answer your question as quickly as possible for you.

  • Extract data from Pipe Delimited file

    Hi everybody,
    Could someone provide me the command to extract data from a pipe delimited file ("|") using Open/Read Data set.
    I mean eliminating the delimiter ("|") and just picking the data.
    Thanks
    M

    Here you go.. this code snippet parses the input file record by using pipe (variable lv_pipe) as separator, for tab separated file you can use lv_tab like wise...
      TYPES: BEGIN OF ts_field,
               field(50) TYPE c,
             END OF ts_field,
             tt_field TYPE TABLE OF ts_field.
       DATA: ls_record TYPE string,
            ls_input_data TYPE ts_input_data,
            lv_tab TYPE x VALUE '09',
            lv_pipe TYPE C VALUE '|',
            ls_field TYPE ts_field,
            lt_field_tab TYPE tt_field,
            lv_field_index TYPE syindex,
            lv_record_no TYPE syindex.
      FIELD-SYMBOLS: <fs_field> TYPE ANY.
      OPEN DATASET fv_file_path IN TEXT MODE FOR INPUT.
      IF sy-subrc = 0.
        DO.
          lv_record_no = lv_record_no + 1.
          READ DATASET fv_file_path INTO ls_record.
          IF sy-subrc NE 0.
            EXIT.
          ELSE.
            SPLIT ls_record  AT lv_pipe INTO TABLE lt_field_tab.
            CLEAR: lv_field_index, ls_input_data.
            LOOP AT lt_field_tab INTO ls_field.
              lv_field_index = lv_field_index + 1.
              ASSIGN COMPONENT lv_field_index OF STRUCTURE
                ls_input_data TO <fs_field>.
              IF sy-subrc = 0.
                <fs_field> = ls_field-field.
              ENDIF.
            ENDLOOP.
            APPEND ls_input_data TO ft_input_data.
          ENDIF.
        ENDDO.
        CLOSE DATASET fv_file_path.

  • Issue with Oracle datatypes like RAW,CLOB&BLOB

    Hello,
    I have developed an windows application using c#
    My requirement is to display data which having datatypes as RAW,CLOB,BLOB etc:
    But i am not able to bind these datatypes to gridview in my application.
    Pleasse ,suggest me way how to fix this.

    You'll need to provide some more details such as a short code snippet of what you are doing?
    What is your expectation as to how a RAW or BLOB should be displayed in a GridView?

  • Extract big table to a delimited file

    Hi Gurus,
    A big table of size more than 4 GB from 10g DB needed to be extracted/exported into a text file,
    the column delimiter is "&|" and row delimiter is "$#".
    I cannot do it from TOAD as it is hanging while extraction of big table.
    Any suggestion will be highly appreciated.
    Thanks in advance.

    >
    A big table of size more than 4 GB from 10g DB needed to be extracted/exported into a text file,
    the column delimiter is "&|" and row delimiter is "$#".
    I cannot do it from TOAD as it is hanging while extraction of big table.
    Any suggestion will be highly appreciated.
    >
    You will need to write your own code to do the unload.
    One possibility is to write a simple Java program and use JDBC to unload the data. This will let you unload the data to any client you run the app on.
    The other advantage of using Java for this is that you can easily ZIP the data as you unload it and use substantially less storage for the resulting file.
    See The Java Tutorials for simple examples of querying an Oracle DB and processing the result set.
    http://docs.oracle.com/javase/tutorial/jdbc/overview/index.html
    Another possibility is to use UTL_FILE. There are plenty of examples in the SQL and PL/SQL forum if you search for them.
    There is also a FAQ for 'How do I read of write an Excel file (note - this also includes delimited files).
    SQL and PL/SQL FAQ

  • How to extract a tab delimiter file on appli server in openhub destination

    Hi All,
    in my scenario i want download a file on application server in tab delimiter file where iam not able to do it.while creating  OHD iam selecting seperator feild has ';'(semicolan).tab delimiter fule format is not posible with semicolan and even i tried it with "comma" also but not getting the tab delimiter formate.please help how to get that particular format..
    thanks
    vamshi..

    Hi Dashyam,
    May help you:----
    with comma delimiter file read
    I want to download comma delimiter file on to presentation server from inte
    http://wiki.sdn.sap.com/wiki/display/ABAP/UploadaCommaDelimitedCSVfilethatcontainscommasindata+fields
    Regards,
    Suman

  • Mapping CLOB and Long in xml schema

    Hi,
    I am creating an xml schema to map some user defined database objects. For example, for a column which is defined as VARCHAR2 in the database, I have the following xsd type mapping.
    <xsd:element name="Currency" type="xsd:string" />
    If the oracle column is CLOB or Long(Oracle datatype), could you please tell me how I can map it in the xml schema? I do not want to use Oracle SQL type like:
    xdb:SQLType="CLOB" since I need a generic type mapping to CLOB. Would xsd:string still hold good for CLOB as well as Long(Oracle datatype) ?
    Please help.
    Thanks,
    Vadi.

    The problem is that LONGs are not buffered but are read from the wire in the order defined. The problem is the same as
    rs = stmt.executeQuery("select myLong, myNumber from tab");
    while (rs.next()) {
    int n = rs.getInt(2);
    String s = rs.getString(1);
    The above will fail for the same reason. When the statement is executed the LONG is not read immediately. It is buffered in the server waiting to be read. When getInt is called the driver reads the bytes of the LONG and throws them away so that it can get to the NUMBER and read it. Then when getString is called the LONG value is gone so you get an exception.
    Similar problem here. When the query is executed the CLOB and BLOB locators are read from the wire, but the LONG is buffered in the server waiting to be read. When Clob.getString is called, it has to talk to the server to get the value of the CLOB, so it reads the LONG bytes from the wire and throws them away. That clears the connection so that it can ask the server for the CLOB bytes. When the code reads the LONG value, those bytes are gone so you get an exception.
    This is a long standing restriction on using LONG and LONG RAW values and is a result of the network protocol. It is one of the reasons that Oracle deprecates LONGs and recommends using BLOBs and CLOBs instead.
    Douglas

  • Convert CLOB to LONG

    I have an app that has a CLOB column in a table. The reporting software, which is separate from the application, cannot read CLOBs. So the solution that was revealed to me was to setup a trigger to copy any data going into the CLOB table to another table where the column is a LONG.
    Of course, no DBA in their right mind would be happy with this. So, I'm trying to set about creating a view that will convert the CLOB to a LONG, so as to relieve my poor SAN from all the I/O. There is no TO_LONG function, nor can I find anywhere how to do this.
    Anyone feel like taking a stab at this?

    Tom,
    My guess is you might have to use dbms_lob.substr subprogram. Anyway, LONG datatype has a limit of 2gb while clob or blob can be bigger (theoritically upto 8TB ). So, you have to decide if you wanna truncate your data and store only the first 2gb. Also, just for information purposes, this is what Oracle says in documentation.
    ----------ORACLE DOCUMENTATION------
    Note:
    Do not create tables with LONG columns. Use LOB columns (CLOB, NCLOB) instead. LONG columns are supported only for backward compatibility.
    Oracle also recommends that you convert existing LONG columns to LOB columns. LOB columns are subject to far fewer restrictions than LONG columns. Further, LOB functionality is enhanced in every release, whereas LONG functionality has been static for several releases.
    HTH,
    Rahul.

  • CMP EJB CLOB/BLOB retrieval issues from Oracle through JBoss

    I have some EJB 2.0 CMP Entity Beans, deployed on a JBoss 3.07 application server.
    In some of my beans I have Strings that I would like to map to a CLOB in my database as the Strings could easily be more than 4000 characters, and some byte arrays that I would like to map to a BLOB in my database to store files.
    When I use PostgreSQL as my datastore in JBoss I can store and retrieve data from my CLOBs and BLOBs just fine.
    However when I use an Oracle 9i (9.0.1) database for my datastore, I can write the information to the CLOB/BLOB fields (I can see it when I manually check the tables), but for some reason I cannot retrieve the information when I load my beans. The fields that map to the CLOB/BLOB are null, and eventually resave themselves overwriting the data in the database.
    When I test using LONG RAW as a type it works perfectly, but LONG RAW is not a standard SQL type. I do not want to convert my beans to BMP, and also do not want to have any Oracle specific code in my beans to store retrieve my information. I need my beans to be completely database independant.
    Does anyone have any ideas what could be causing my retrieval problem and what I could do to fix it?

    I solved my problem.
    I am using XDoclet to generate my bean interfaces and xml files etc., and it generates the jbosscmp-jdbc.xml file for me.
    I forgot to add @jboss tags to my beans so that the jbosscmp-jdbc.xml file includes tags to overwrite the default cmp mapping (string to varchar) to be from string to clob for those specific long string fields that i want.

  • How to read a BLOB (base64 - stream) from XML-file in ORACLE10

    ORACLE 10g
    PL/SQL function
    MY XML-file:
    <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
    <slo xmlns="http://www.example.org/detection">
         <LekKey>1999_036371_509627</LekKey>
         <HuiNum>46</HuiNum>
         <Res></Res>
         <InfLig>TEST STRUI AFGESTORVEN - PLAANSTRAAT 46</InfLig>
         <XWGS>3.637028</XWGS>
         <YWGS>50.962667</YWGS>
         <Pei>EANDIS</Pei>
         <DatPei>1999-11-30T10:17:36.000+01:00</DatPei>
         <Kan> </Kan>
         <Doc>UEsDBBQABgAIAAAAIQB5gHbnswEAAHcGAAATAAgCW0NvbnRlbnRfVHlwZXNdLnhtbCCiBAIooAACAAAA
    AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
    AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
    AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
    AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
    AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
    AAAAAAAAAAAAAAAAAAAAAAAAAA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nRUYWJsZS54bWxQSwECLQAUAAYACAAAACEAp/3kQ44BAADeAgAA
    EQAAAAAAAAAAAAAAAACYOgkAZG9jUHJvcHMvY29yZS54bWxQSwECLQAUAAYACAAAACEAqchcqowAAADa
    AAAAEwAAAAAAAAAAAAAAAABdPQkAY3VzdG9tWG1sL2l0ZW0xLnhtbFBLAQItABQABgAIAAAAIQBgX/2I
    CwEAALoBAAAUAAAAAAAAAAAAAAAAAEI+CQB3b3JkL3dlYlNldHRpbmdzLnhtbFBLAQItABQABgAIAAAA
    IQDQwaCR/gEAAGgEAAAQAAAAAAAAAAAAAAAAAH8/CQBkb2NQcm9wcy9hcHAueG1sUEsFBgAAAAASABIA
    pQQAALNCCQAAAA==</Doc>
    </slo>
    I have to write an PL/SQL function where I can read all the data in the XML-file (see attach).
    In this XML there is a BLOB stored (base64 - stream -> that contains always a MSWORD document).
    1) how can I extract this BLOB + the other data in the XML and save this data in a ORACLE table?
    2) how can I decode this BLOB and save this MSWORD-document to a fileserver?

    First extract your data as CLOB (as it's character based)...
    SQL> ed
    Wrote file afiedt.buf
      1  with t as (select xmltype('<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
      2  <slo xmlns="http://www.example.org/detection">
      3    <LekKey>1999_036371_509627</LekKey>
      4    <HuiNum>46</HuiNum>
      5    <Res></Res>
      6    <InfLig>TEST STRUI AFGESTORVEN - PLAANSTRAAT 46</InfLig>
      7    <XWGS>3.637028</XWGS>
      8    <YWGS>50.962667</YWGS>
      9    <Pei>EANDIS</Pei>
    10    <DatPei>1999-11-30T10:17:36.000+01:00</DatPei>
    11    <Kan> </Kan>
    12    <Doc>UEsDBBQABgAIAAAAIQB5gHbnswEAAHcGAAATAAgCW0NvbnRlbnRfVHlwZXNdLnhtbCCiBAIooAACAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA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ko0ZaHgJzdW1hj8TfGUZPPWqCeLCB
    7J6HX/+OZpckbWxQSwECLQAUAAYACAAAACEAdD85esIAAAAoAQAAHgAAAAAAAAAAAAAAAADqNAkAY3VzdG9tWG1sL19yZWxzL2l0ZW0xLnhtbC5yZWxzUEsBAi0AFAAGAAgAAAAhANouSfniAAAAVQEAABgAAAAAAAAAAAAAAAAA8DYJAGN1c3RvbVhtbC9pdGVtUHJvcHMxLnhtbFBLAQItABQABgAIAAAAIQD+hDirOAIAAMwHAAASAAAAAAAA
    AAAAAAAAADA4CQB3b3JkL2ZvbnRUYWJsZS54bWxQSwECLQAUAAYACAAAACEAp/3kQ44BAADeAgAAEQAAAAAAAAAAAAAAAACYOgkAZG9jUHJvcHMvY29yZS54bWxQSwECLQAUAAYACAAAACEAqchcqowAAADaAAAAEwAAAAAAAAAAAAAAAABdPQkAY3VzdG9tWG1sL2l0ZW0xLnhtbFBLAQItABQABgAIAAAAIQBgX/2ICwEAALoBAAAUAAAAAAAA
    AAAAAAAAAEI+CQB3b3JkL3dlYlNldHRpbmdzLnhtbFBLAQItABQABgAIAAAAIQDQwaCR/gEAAGgEAAAQAAAAAAAAAAAAAAAAAH8/CQBkb2NQcm9wcy9hcHAueG1sUEsFBgAAAAASABIApQQAALNCCQAAAA==</Doc>
    13  </slo>') as xml from dual)
    14  --
    15  -- end of test data
    16  --
    17  select x.*
    18  from   t
    19        ,xmltable(xmlnamespaces(default 'http://www.example.org/detection'),
    20                  '/slo'
    21                  passing t.xml
    22                  columns lekkey varchar(30) path './LekKey'
    23                         ,doc    clob        path './Doc'
    24*                ) x
    SQL> /
    LEKKEY                         DOC
    1999_036371_509627             UEsDBBQABgAIAAAAIQB5gHbnswEAAHcGAAATAAgCW0NvbnRlbnRfVHlwZXNdLnhtbCCiBAIooAACAAAA
                                   AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
                                   AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
                                   AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
                                   AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
                                   AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
                                   AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
                                   AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
                                   AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
                                   AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAC0VUtP20AQviP1P1h7rewNPVRVFYcDj2OL1FTluqzH
                                   ycK+tDMB8u8764AVwMSBiIsle/d7zLc74+nJg7PFHSQ0wdfiuJqIArwOjfGLWvydX5Q/RIGkfKNs8FCL
                                   NaA4mX05ms7XEbBgtMdaLIniTylRL8EprEIEzyttSE4Rv6aFjErfqgXIb5PJd6mDJ/BUUuYQs+kZtGpl
                                   qTh/4M8bJ9EvRHG62ZelamFcxufvchCRwOILiIrRGq2Ia5N3vnnhq3z0VDGy24NLE/ErG39DIa8897Qt
                                   8DbuJg7XchOhK+Y3559MA8WlSvRLOS5W3ofUyCboleOgqt3KA6WFtjUaenxmiyloQOSDdbbqV5wy/qnk
                                   IR96hRTclbPSELjLFCIeH2ynJ818kMhAH/uQhy4LpLUFPFj6VRIb3l0RbMn/M7Q8b1vQfKvHz8RhmbHV
                                   RmILO64GRHxQ+4g877Vy7ODxkXnUwj1c//k0F1vko0ZaHgJzdW1hj8TfGUZPPWqCeLCB7J6HX/+OZpck
                                   bWxQSwECLQAUAAYACAAAACEAdD85esIAAAAoAQAAHgAAAAAAAAAAAAAAAADqNAkAY3VzdG9tWG1sL19y
                                   ZWxzL2l0ZW0xLnhtbC5yZWxzUEsBAi0AFAAGAAgAAAAhANouSfniAAAAVQEAABgAAAAAAAAAAAAAAAAA
                                   8DYJAGN1c3RvbVhtbC9pdGVtUHJvcHMxLnhtbFBLAQItABQABgAIAAAAIQD+hDirOAIAAMwHAAASAAAA
                                   AAAAAAAAAAAAADA4CQB3b3JkL2ZvbnRUYWJsZS54bWxQSwECLQAUAAYACAAAACEAp/3kQ44BAADeAgAA
                                   EQAAAAAAAAAAAAAAAACYOgkAZG9jUHJvcHMvY29yZS54bWxQSwECLQAUAAYACAAAACEAqchcqowAAADa
                                   AAAAEwAAAAAAAAAAAAAAAABdPQkAY3VzdG9tWG1sL2l0ZW0xLnhtbFBLAQItABQABgAIAAAAIQBgX/2I
                                   CwEAALoBAAAUAAAAAAAAAAAAAAAAAEI+CQB3b3JkL3dlYlNldHRpbmdzLnhtbFBLAQItABQABgAIAAAA
                                   IQDQwaCR/gEAAGgEAAAQAAAAAAAAAAAAAAAAAH8/CQBkb2NQcm9wcy9hcHAueG1sUEsFBgAAAAASABIA
                                   pQQAALNCCQAAAA==
    SQL>Then, you can convert the CLOB to a BLOB by doing your base64 decoding.

  • JDBC Thin Client and Oracle Long Datatype

    I am using Wepshere 4.0.2 , JDBC 2.0 (thin driver) and oracle 9i.
    I have a procedure which takes Oracle Long Datatype as its parameter.
    I use following code to execute procedure.
    String dataforsql="AAA000000003 123123 07/01/200301/01/2003";
    byte[] bytes = dataforsql.getBytes();
    InputStream is = new ByteArrayInputStream(bytes);
    cstmt=conn.prepareCall("call nscw.CPPF_SAVEPDCRAWTABLE2(?,?,?)");
    cstmt.setAsciiStream (1, is,bytes.length);
    The above code works perfectly for data upto 4000 bytes. Once the data crosses the 4000 mark.
    i get a procedure error
    ORA-01460: unimplemented or unreasonable conversion requested

    cstmt.setAsciiStream (1, is,bytes.length);Oracle's support for CLOB (and BLOB) columns using set{Ascii,Binary}Stream() generally s*cks. You'll have to read Oracle's own JDBC manual (you can read it online at http://technet.oracle.com) for whatever sequence they recommend.
    E.g. for insertion and updation of CLOBS, you're supposed to use an oracle-specific function (EMPTY_CLOB()) as the value in the INSERT/UPDATE statement, and then do a SELECT, getClob(), and use Clob APIs to update the actual column value. At least officially. Or you have to use some Oracle-specific APIs in oracle.sql.Connection and oracle.sql.CLOB.

  • How to export data from a Oracle table to a delimited file?

    I know how to load delimited file into a table, but how to export
    data from a Oracle table to a delimited file?
    Thanks in advance.

    Try looking at this link, it's long but there's three different solutions discussed in it. If you look at Barbara Boehmer's
    solution in her posts in the link below you'll see that she's addressed your concerns with spool files.
    Re: utl_smtp and triggers

  • Urgent + Search a delimited file for more then one string

    Hi All
    Urgent please help I am trying to search a file for 2 different strings.
    This is how the command prompt will look like
    java match "-t|" -4 -f Harvey -10 -f Atlanta callbook.txtPlease help me with identifying how many search criterias have been entered on command prompt.
    "-t|" - denotes a delimiter
    -4 - denotes the field number
    -f - case sensitive
    Thanks

    Hi
    Thanks for your quick response and I apologise I will never put urgent on my posting again.
    C:\>java match "-t|" -4 -f Harvey -10 -f Atlanta callbook.txt
    This example lists records for Atlanta with first name Harvey.
    I am able to get one search criteria but when I have 2 as above (Harvey and Atlanta) I get lost I do not know how to get these arguments from the commandline and still do a search correctly. My code at the moment is doint a hard coded search so I was trying to extract the arguments that's where I got stuck.
    The main aim of my app is to search a delimited file for a search criteria passed through a command prompt.
    This is what I have done so far.
    import  java.io.*;
    import java.util.*;
    public class assess1
        static public void main(String args[])
            int[] totals = new int[10];
            try
                BufferedReader inFile = new BufferedReader(new FileReader(args[0]) );
                try
                    String line;
              String StrSearch = "HARVEY";
              int counter = 0;
                    boolean foundIt = false;
                    while((line = inFile.readLine()) != null)
                     // search for the string
                      String[] values = line.split("\\|");
                       for (String str : values) {
                   if (str.equals("HARVEY")) {
                               System.out.println(line);
                             System.out.println();
                        counter++;
              if (counter == 0) {
                   System.out.println("String not found");
              inFile.close();
                catch(IOException e)
                    System.err.println("IO exception");
                    System.exit(1);
                catch(NumberFormatException e)
                    System.err.println("Value " + e.getMessage() + "not numeric");
            catch(FileNotFoundException e)
                System.err.println( "Couldn't open " + e.getMessage() );
                System.exit(1);
    }

Maybe you are looking for

  • Why can I not highligt text? (text is a scan from a book) I use: PC, Win 8, Reader XI

    Hi there :-) I read a lot of scanned text from my teacher as a part of my study. According to manuals, I should be able to highlight text - but It's not working. Is it because the text is a scan? does it only work with text document files that are co

  • Restore database in no archivelog mode

    hello all, Our DB version is 10.2.2.0 Os is Linux RHL4 Our Database is in noarchive log mode. i am performing Recovery of DB from previous cold backup. so, apart from datafile and controlfile ,do i need to restore the online redolog file also from th

  • Applicatio​n Migration to X61

    Hello, I am upgrading from a T42 to an X61 and I was wondering if Lenovo had some software for moving applications (e.g. MS Office), settings and data from the T42 to the X61 or is my only option to pay $50 to PC Mover program. I do not have original

  • OSB and async BPEL Process

    Hi all, I have a problem configuring the osb to use an asynchronous bpel process. Made the following steps: 1.) Created one Proxy Service for invoking the bpel process 2.) Created one Proxy Service for callback 3.) Created one Business Service which

  • Missing messages or delay of messages in group mms.

    I'm experiencing extreme message delays in group mms - we're talking hours here.    Also, I'm not receiving all of the messages in the group Or they are out of order.  I recently upgraded from an iPhone 4s to an iPhone 5s.        Any ideas?