Reading bytes from CLOB not BLOB

I know that DBMS_LOB.SUBSTR can read number of bytes (for BLOBs) or characters (for CLOBs).
What I want is to read bytes from BLOB instead of characters.
The following tries to read 4000 bytes. Unfortunately It fails to read 4000 bytes if size of CLOB_COLUMN is bigger than 4000 bytes.
select dbms_lob.substr(utl_raw.cast_to_raw(CLOB_COLUMN),4000,1) from dualIs it possible to get only these 4000 bytes from CLOB_COLUMN?
Thank you in advance.

Welcome to the forum.
Unfortunately It fails to read 4000 bytes if size of CLOB_COLUMN is bigger than 4000 bytes.Could it be you're mixing up things?
DBMS_LOB.SUBSTR reads bytes from BLOBS, characters from CLOBS.
"amount Number of bytes (for BLOBs) or characters (for CLOBs) to be read."
http://download.oracle.com/docs/cd/B19306_01/appdev.102/b14258/d_lob.htm#sthref3199
No need to cast_to_raw, afaik:
SQL> create table t as select to_clob(lpad('*', 10000, '*')) clob_col from dual;
Table created.
SQL> desc t;
Name                                                                   Null?    Type
CLOB_COL                                                                        CLOB
SQL> select substr(clob_col,1, 4000) substr
  2  ,      length(substr(clob_col,1, 4000)) substr_lngth
  3  ,      dbms_lob.substr(clob_col, 4000, 1) lob_substr
  4  ,      length(dbms_lob.substr(clob_col, 4000, 1)) lob_substr_length
  5  from t;
SUBSTR                                                                           SUBSTR_LNGTH
LOB_SUBSTR
LOB_SUBSTR_LENGTH
********************************************************************************         4000
             4000
1 row selected.

Similar Messages

  • IB Error: Unable to read symbols from "UIKit" (not yet mapped into memory)

    I created a simple view program for iPhone, using IB to add a button and a label, once the button is clicked, the label text is changed.
    I am able to compile it fine, and ran it. The program/view showed up. But when I clicked on the button, the console showed this message:
    This GDB was configured as "i386-apple-darwin".warning: Unable to read symbols for "/System/Library/Frameworks/UIKit.framework/UIKit" (file not found).
    warning: Unable to read symbols from "UIKit" (not yet mapped into memory).
    I checked UIKit info, it's physically (full path) at:
    /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS2.0.sdk/System/Lib rary/Frameworks/UIKit.framework
    The relative path to SKD is:
    System/Library/Frameworks/UIKit.framework
    I'm running the latest SDK beta 8, OS X 10.5.4 latest update.
    Anyone had this bizarre problem? I was able to run all Apple samples fine.
    Please help!
    THanks!

    The answer is mentioned in a few other posts, but I thought I'd repeat it here, so that it's easier to find this solution in the future.
    I got the same problem trying to build an iPhone-Simulator application using another build process -- in this case, Boost Build. When I tried to run the program, it gave me the same nonsensical dynamic-library error.
    The problem is that the application you built for the iPhone Simulator is NOT a real application, even though it looks like one. You need to run it from within Xcode.
    In my case, I got around the problem by building the GLPaint sample using Xcode, copying over the executable it generated with the one I generated via Boost Build, then running GLPaint (actually my program now) from within Xcode. Then it worked.
    So far, it seems that Macintosh and iPhone are very unfriendly platforms to someone that's trying to port an existing project. Any attempt to do something, without completely buying into the Apple way of doing everything, leads to a torrent of cryptic undocumented errors. Even an old Unix guru like me can't keep up.

  • Read byte from a long

    Hi,
    How can I read bytes from a long. i..e read one byte by one byte from long.
    Naman Patel

    ok here is my problem how do i ignore the sign byte i.e please check this code
    long nr=1345345333L, add=7, nr2=0x12345671L;
              long tmp;
              long[] result = new long[2];
              char[] pwd = password.toCharArray();
              for (int pCount = 0; pCount < pwd.length; pCount++){
                   if (pwd[pCount] == ' ' || pwd[pCount] == '\t')
                        continue;
                   tmp= (long) pwd[pCount];
                   nr^= (((nr & 63)+add)*tmp)+ (nr << 8);
                   nr2+=(nr2 << 8) ^ nr;
                   add+=tmp;
              result[0]=nr & (((long) 1L << 31) -1L); /* Don't use sign bit (str2int) */;
              result[1]=nr2 & (((long) 1L << 31) -1L);
              int i = 0;
              long x = result[0];
              byte b[] = longToBytes(x);
              String str = "";
              i = 0;
              while(i < 4){
                   if(b[i] == 0x00) {
                        System.out.println("byte is 0x00");
                        str += "00";
                   else {
                        if(b[i] <= 0x0f && b[i] >= 0) {
                             System.out.println("byte is 0x0f" + b);
                             str += "0";
                        break;
                   i++;
              i = 0;
              str += Long.toHexString(result[0]);
              x = result[1];
              b = longToBytes(x);
              while(i < 4){
                   if(b[i] == 0x00) {
                        System.out.println("byte is 0x00");
                        str += "00";
                   else {
                        if(b[i] <= 0x0f && b[i] >= 0) {
                             System.out.println("byte is 0x0f");
                             str += "0";
                        break;
                   i++;
              str += Long.toHexString(result[1]);

  • Read data from CLOB field

    Hello,
    I have table ( table1 ) with clob field ( clob1 ).
    Content of clob1 field is :
    data01 data02 data03 12345 data04
    data05 data06 data07 32131 data08
    data09 data10 data11 43422 data12
    data13 data14 data15 54534 data16
    Content of clob1 field is imported from ASCII file. Number of records in ASCII file is variable.
    How can I read each row separately from clob1 field?
    Thanks

    Here is an example of how it can be done.
    Note you will have to have an end of line marker on each line including the last line.
    In my case I have used the '@' symbol as a line delimiter
    declare
    v_clob clob := 'This is my@clob string which@is over a number@of lines@';
    v_clob_length number;
    v_read_pos number := 1;
    v_subclob clob;
    v_line varchar2(4000);
    v_marker number;
    begin
    v_clob_length := dbms_lob.getlength(v_clob);
    while  v_read_pos <= v_clob_length
    loop
    v_subclob := empty_clob();
    -- make a clob of the smaller piece of data
    v_subclob := dbms_lob.substr(v_clob,v_clob_length,v_read_pos);
    -- find the position of the end of line marker
    v_marker  := dbms_lob.instr(v_subclob,'@');
    -- build a line from the subclob, removing the trailing end of line marker
    v_line    := dbms_lob.substr(v_subclob,v_marker-1,1);
    dbms_output.put_line(v_line);
    --  increment the position from where to start reading the original clob
    v_read_pos := v_read_pos+length(v_line)+1;
    end loop;
    end;This produces the following
    This is my
    clob string which
    is over a number
    of lines

  • Acrobat XI crashes when reading/copying from sticky note.

    has anyone else had an issue with reading or coping text from sticky note. amendements are higlighted using the sticky note.
    it would be great to know as I've gone back to using 9. thanks

    I use Mavericks and Acrobat XI. I haven't had any issues so far.

  • Read data from Oracle , not all data brought over

    I have a strange problem when read data from Oracle and save to SQL Server.
    For example , there are 20k rows of data in Oracle , I created SSIS data flow, and data saved in SQL Server , Everything looks fine. But late you will find only first 16k rows of data in SQL Server , the rest is simple missng. no error or any waring. 
    I am using OLE DB .
    Great appreciate for any help.
    Ray

    Thanks. I think that UseSessionFormat=true
    helped me fixed this kind of issue in my other project.
    I actually found out this issue for this case I was asking. I am actually not missing data. It was a data type issue. A column was using a wrong datatype, so when I run a query and didn't get result I supposed. 
     

  • Failed to read bytes from InputStream

    Hi,
    I get this excpetion log when I try to read a stream from weblogic. Can anyone help me out why this happens and what
    could be done to overcome this
    ####<Aug 8, 2007 4:48:37 PM EDT> <Error> <HTTP> <sundev01> <fhsserver> <[ACTIVE] ExecuteThread: '2' for queue: 'weblogic.kernel.Default (self-tuning)'> <<WLS Kernel>> <> <> <1186606117277> <BEA-101019> <[weblogic.servlet.internal.WebAppServletContext@111f9b - name: 'FFMS', context-path: '/FFMS'] Servlet failed with IOException
    java.io.IOException: failed to read '2678' bytes from InputStream; clen: 58512 remaining: 44902 count: 1394
    at weblogic.servlet.internal.ChunkOutput.writeStream(ChunkOutput.java:411)
    at weblogic.servlet.internal.ChunkOutputWrapper.writeStream(ChunkOutputWrapper.java:168)
    at weblogic.servlet.internal.ServletOutputStreamImpl.writeStream(ServletOutputStreamImpl.java:496)
    at weblogic.servlet.internal.ServletOutputStreamImpl.writeStream(ServletOutputStreamImpl.java:484)
    at weblogic.servlet.FileServlet.sendFile(FileServlet.java:400)
    at weblogic.servlet.FileServlet.doGetHeadPost(FileServlet.java:224)
    at weblogic.servlet.FileServlet.service(FileServlet.java:166)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
    at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:225)
    at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:127)
    at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:272)
    at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:165)
    at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3150)
    at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
    at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121)
    at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:1973)
    at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:1880)
    at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1310)
    at weblogic.work.ExecuteThread.execute(ExecuteThread.java:207)
    at weblogic.work.ExecuteThread.run(ExecuteThread.java:179)
    >

    Hi Aravind,
    Which version of weblogic are u using?
    Cheers,
    Lakshmi

  • Error reading data from CLOB column into VARCHAR2 variable

    Hi all,
    Am hitting an issue retrieving data > 8K (minus 1) stored in a CLOB column into a VARCHAR2 variable in PL/SQL...
    The "problem to be solved" here is storing DDL, in this case a "CREATE VIEW" statement, that is longer than 8K for later retrieval (and execution) using dynamic SQL. Given that the EXECUTE IMMEDIATE statement can take a VARCHAR2 variable (up to 32K(-1)), this should suffice for our needs, however, it seems that somewhere in the process of converting this VARCHAR2 text to a CLOB for storage, and then retrieving the CLOB and attempting to put it back into a VARCHAR2 variable, it is throwing a standard ORA-06502 exception ("PL/SQL: numeric or value error"). Consider the following code:
    set serveroutput on
    drop table test1;
    create table test1(col1 CLOB);
    declare
    cursor c1 is select col1 from test1;
    myvar VARCHAR2(32000);
    begin
    myvar := '';
    for i in 1..8192 loop
    myvar := myvar || 'a';
    end loop;
    INSERT INTO test1 (col1) VALUES (myvar);
    for arec in c1 loop
    begin
    myvar := arec.col1;
    dbms_output.put_line('Read data of length ' || length(myvar));
    exception when others then
    dbms_output.put_line('Error reading data: ' || sqlerrm);
    end;
    end loop;
    end;
    If you change the loop upper bound to 8191, all works fine. I'm guessing this might have something to do with the database character set -- we've recently converted our databases over to UTF-8, for Internationalizion support, and that seems to have changed underlying assumptions regarding character processing...?
    As far as the dynamic SQL issue goes, we can probably use the DBMS_SQL interface instead, with it's EXECUTE procedure that takes a PL/SQL array of varchar2(32K) - the only issue there is reading the data from the CLOB column, and then breaking that data into an array but that doesn't seem insurmountable. But this same basic issue (when a 9K text block, let's say, turns into a >32K block after being CLOBberred) seems to comes up in other text-processing situations also, so any ideas for how to resolve would be much appreciated.
    Thanks for any tips/hints/ideas...
    Jim

    For those curious about this, here's the word from Oracle support (courtesy of Metalinks):
    RESEARCH
    ========
    Test the issue for different DB version and different characterset.
    --Testing the following PL/SQL blocks by using direct assignment method(myvar := arec.col1;) on
    different database version and different characterset.
    SQL>create table test1(col1 CLOB);
    --Inserting four CLOB data into test1.
    declare
    myvar VARCHAR2(32767);
    begin
    myvar := RPAD('a',4000);
    INSERT INTO test1 (col1) VALUES (myvar);
    myvar := RPAD('a',8191);
    INSERT INTO test1 (col1) VALUES (myvar);
    myvar := RPAD('b',8192);
    INSERT INTO test1 (col1) VALUES (myvar);
    myvar := RPAD('c',32767);
    INSERT INTO test1 (col1) VALUES (myvar);
    commit;
    end;
    --Testing the direct assignment method.
    declare
    cursor c1 is select col1, length(col1) len1 from test1;
    myvar VARCHAR2(32767);
    begin
    for arec in c1 loop
    myvar := arec.col1;
    --DBMS_LOB.READ(arec.col1, arec.len1, 1, myvar);
    dbms_output.put_line('Read data of length: ' || length(myvar));
    end loop;
    end;
    The following are the summary of the test results:
    ===================================
    1. If the database characterset is WE8ISO8859P1, then the above direct assignment
    method(myvar := arec.col1;) works for database version 9i/10g/11g without any
    errors.
    2. If the database characterset is UTF8 or AL32UTF8, then the above direct assignment method(myvar := arec.col1;) will generate the "ORA-06502:
    PL/SQL: numeric or value error" when the length of the CLOB data is greater
    than 8191(=8K-1). The same error can be reproduced across all database versions
    9i/10g/11g.
    3. Using DBMS_LOB.READ(arec.col1, arec.len1, 1, myvar) method to read CLOB data into a VARCHAR2 variable works for both WE8ISO8859P1 and UTF8
    characterset and for all database versions.
    So - it seems as I'd surmised, UTF8 changes the way VARCHAR2 and CLOB data is handled. Not too surprising, I suppose - may you all be lucky enough to be able to stay away from this sort of issue. But - the DBMS_LOB.READ workaround is certainly sufficient for the text processing situations we find ourselves in currently.
    Cheers,
    Jim C.

  • Convert a column from CLOB to BLOB

    hi,
    I recently had a requirement to save a XML file in Database. Presently the column is of datatype CLOB. But since CLOB has asize limitation, when iam saving a file of larger size it is throwing exception.
    So iam planning to convert this CLOB column to BLOB.
    Is this a right approach??

    798116 wrote:
    hi,
    I recently had a requirement to save a XML file in Database. Presently the column is of datatype CLOB. But since CLOB has asize limitation, when iam saving a file of larger size it is throwing exception.
    So iam planning to convert this CLOB column to BLOB.
    Is this a right approach??I'd be very concerned if you're creating XML that exceeds the limits of a CLOB column. That would smell of bad design somewhere.
    Character based data such as XML, would be better placed in a CLOB than a BLOB, as a BLOB is primarily for storing binary data, not character data.
    The best however would be to store your XML in an XMLTYPE datatype, which is based on CLOB, as that offers XML methods around it.

  • Query to read XML from CLOB table column

    Hi
    I want an SQL to get the following information extract from a CLOB table column.
    MasterReport/sg:RptDef/sg:RptCell@RealDesc MasterReport/sg:RptDef/sg:RptCell@RealNum
    credits                              100
    debits                              100
    Sample XML data from table column is:
    <?xml version="1.0" encoding="UTF-8" ?>
    <MasterReport xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:sg="http://www.oracle.com/fsg/2002-03-20/" xsi:schemaLocation="http://www.oracle.com/2002-03-20/fsg.xsd">
    <sg:LDGName>Vision Portugal</sg:LDGName>
    <sg:SOBName>Vision Portugal</sg:SOBName>
    <sg:DataAccessSetName>Vision Portugal</sg:DataAccessSetName>
    <sg:InternalReportName>Model 30 Report</sg:InternalReportName>
    <sg:CustomParam10 />
    <sg:RowContext RowId="r100001">
    <sg:RowName />
    <sg:RowLineItem>Litigation Credits- Total amount from previous period</sg:RowLineItem>
    <sg:RowDispUnit>1</sg:RowDispUnit>
    <sg:RowDispFormat />
    <sg:RowUnitOfMeasure>EUR</sg:RowUnitOfMeasure>
    <sg:RowLedgerCurrency>ANY</sg:RowLedgerCurrency>
    <sg:RowCurrencyType>T</sg:RowCurrencyType>
    <sg:RowChangeSign>0</sg:RowChangeSign>
    <sg:RowSeq>1.0000000000000</sg:RowSeq>
    </sg:RowContext>
    <sg:RowContext RowId="r100002">
    <sg:RowName />
    <sg:RowLineItem>Litigation credits- Taxed amounts from column2 for Previous period</sg:RowLineItem>
    <sg:RowDispUnit>1</sg:RowDispUnit>
    <sg:RowDispFormat />
    <sg:RowUnitOfMeasure>EUR</sg:RowUnitOfMeasure>
    <sg:RowLedgerCurrency>ANY</sg:RowLedgerCurrency>
    <sg:RowCurrencyType>T</sg:RowCurrencyType>
    <sg:RowChangeSign>0</sg:RowChangeSign>
    <sg:RowSeq>2.0000000000000</sg:RowSeq>
    </sg:RowContext>
    <sg:ColContext ColId="c1000">
    <sg:ColAmountType />
    <sg:ColPeriod />
    <sg:ColPerOffset />
    <sg:ColChangeSign />
    <sg:ColPosition />
    <sg:ColSeq />
    <sg:ColWidth>100</sg:ColWidth>
    </sg:ColContext>
    <sg:ColContext ColId="c1001">
    <sg:ColName>Total</sg:ColName>
    <sg:ColDescr />
    <sg:ColDispUnit>1</sg:ColDispUnit>
    <sg:ColUnitOfMeasure>EUR</sg:ColUnitOfMeasure>
    <sg:ColLedgerCurrency>ANY</sg:ColLedgerCurrency>
    <sg:ColCurrencyType>T</sg:ColCurrencyType>
    <sg:ColDispFormat>999999999.99</sg:ColDispFormat>
    <sg:ColAmountType>YTD-Actual</sg:ColAmountType>
    <sg:ColPerOffset>0</sg:ColPerOffset>
    <sg:ColAmntId>14</sg:ColAmntId>
    <sg:ColParamId>-1</sg:ColParamId>
    <sg:ColType>A</sg:ColType>
    <sg:ColStyle>B</sg:ColStyle>
    <sg:ColPeriod>10-08</sg:ColPeriod>
    <sg:ColPeriodYear>2008</sg:ColPeriodYear>
    <sg:ColPeriodNum>11</sg:ColPeriodNum>
    <sg:ColPeriodStart>2008-10-01T00:00:00</sg:ColPeriodStart>
    <sg:ColPeriodEnd>2008-10-31T00:00:00</sg:ColPeriodEnd>
    <sg:ColChangeSign>0</sg:ColChangeSign>
    <sg:ColHeadLine1>Totals</sg:ColHeadLine1>
    <sg:ColHeadLine2 />
    <sg:ColHeadLine3 />
    <sg:ColHeadLine4 />
    <sg:ColHeadLine5 />
    <sg:ColHeadLine6 />
    <sg:ColHeadLine7 />
    <sg:ColHeadLine8 />
    <sg:ColHeadLine9 />
    <sg:ColPosition>99</sg:ColPosition>
    <sg:ColSeq>1.0000000000000</sg:ColSeq>
    <sg:ColWidth>14</sg:ColWidth>
    </sg:ColContext>
    <sg:RptDef RptId="p1001" RptDetName="Ledger=Vision PT (Vision Portugal)" RptPESegm="" RptPEVal="" RptTabLabel="Output 1 (Vision PT)">
    <sg:RptLine RptCnt="p1001" RowCnt="r100001" LineRowSeq="1.0000000000000" LinCnt="l100001">
    <sg:RptCell ColCnt="c1000" RealDesc="debits">debits</sg:RptCell>
    <sg:RptCell ColCnt="c1001" RealNum="100.000000">100.00</sg:RptCell>
    </sg:RptLine>
    <sg:RptLine RptCnt="p1001" RowCnt="r100002" LineRowSeq="2.0000000000000" LinCnt="l100002">
    <sg:RptCell ColCnt="c1000" RealDesc="creditsd">credits</sg:RptCell>
    <sg:RptCell ColCnt="c1001" RealNum="100.000000">100.00</sg:RptCell>
    </sg:RptLine>
    </sg:RptDef>
    <sg:TabCount>1</sg:TabCount>
    </MasterReport>
    Please help me.
    Regards
    Giri
    Edited by: user576087 on Mar 18, 2012 11:54 PM

    I'm not sure if you want the values from the attribute or the element, but this should give you a good start :
    SQL> alter session set nls_numeric_characters = ".,";
    Session altered
    SQL>
    SQL> select x.*
      2  from my_table t
      3     , xmltable(
      4         xmlnamespaces('http://www.oracle.com/fsg/2002-03-20/' as "sg")
      5       , '/MasterReport/sg:RptDef/sg:RptLine'
      6         passing xmltype(t.xmldoc)
      7         columns type    varchar2(30) path 'sg:RptCell[1]'
      8               , amount  number       path 'sg:RptCell[2]'
      9       ) x
    10  ;
    TYPE                               AMOUNT
    debits                                100
    credits                               100

  • Reading bytes from a server

    Ok,
    I want to connect to a server and recieve a data from it.
    the data is broken up as follows:
    int flag;
    int x, y;
    String name;
    the server i'm communicating with is written in C, so i'm trying to figure out how i'm going to recieve this data.
    What is the size that java uses to store an integer value?
    IF java uses unicode, that's two bytes per character right?
    so if name was 30 characters long it would be 60 bytes?
    i'm thinking of trying to either read the whole transmission into one string then separate, or separate as it comes in?
    could someone suggest how to proceed>

    Java holds (primitive) integers in 32 bits.
    Java holds characters in 16 bits (two bytes)
    30 characters will occupy 30*16 = 480 bits (60 bytes)
    Java provides the java.net package for networking. In there you can find a class called Socket that identifies the clients's communication endpoint, and encapsulates a host and an application address (port).
    First you open a socket to a server:
    Socket s = new Socket( serverName, serverPort );
    then you just read an input stream from the socket.
    DataInputStream dis = new DataInputStream( s.getInputStream() );
    String message = dis.readUTF(); //wait for server to send
    s.close() // close the socket
    Now, you can do with message whatever you like. It's that simple!
    For more information you can see the related tutorials from java.

  • How can I read bytes from std input using nextByte()

    Hi. I am trying to read input text from std input into a byte array. I used the following procedure but have been getting errors
    Scanner myScanner = new Scanner(System.in);
         do{
              List[i] = myScanner.nextByte();
              i++;
         }while(i<List.length);
    When i try to print the List array after this loop, i get an InputMismatchException and Unknown Source error. What could be responsible for this?
    Thanks

    i don't really know what you're trying to do, but try this:
    maybe it helps you out.
    byte List[] = new byte[10];
            for (int i = 0; i < List.length; i++) {
                Scanner myScanner = new Scanner(System.in);
                List[i] = myScanner.nextByte();
            }this code creates an array of byte elements. the length of the array is 10 ( = new byte[*10*]). the for loop let's you fill the array with byte numbers over the keyboard.
    good luck

  • Reading from CLOB..Clolumn from table

    Hi,
    I would like to know the reading data from CLOB Column can any one help in this regard,
    I had written some code but I would like to loop it..
    Please see the code given below :-
    DECLARE
    lobloc CLOB;
    buffer VARCHAR2(32000);
    amount NUMBER := 200;
    amount_in_buffer NUMBER;
    offset NUMBER := 1;
    BEGIN
    --Initialize buffer with data to be inserted
    SELECT f_large_value
    into lobloc
    FROM T_PRODUCT_BRAND_PARAMS
    WHERE F_BRAND_ID='PPNET' AND F_PRODUCT_ID ='CASINO'
         AND F_KEY LIKE '%TAB_CONFIG%';
    dbms_lob.read(lobloc,amount,offset,buffer);
    --using length built-in function to find the length of the buffer
    amount_in_buffer := length(buffer);
    dbms_output.put_line(buffer);
    -- dbms_output.put_line(to_char(amount_in_buffer));
    END;
    where f_large_value is clob column,
    when I executed its given oly first 5 lines of the data..
    I would like to loop it can any one suggest me... in this regard
    Thanks
    Pavan Kumar N

    Hi,
    I am using BO Data Integrator as ETL tool, can you specify how will I 'split the data loads' or 'read the data in mutliple passes' ? Is it by using multiple Query Transform with different Where clause as filters? eg. 'by period' and  'by year'?
    Query_1 filter:
    year = 2006
    Query_2 filters:
    year = 2007
    Merge:
    Query_1 and Query_2
    Thanks again!
    Randy

  • CLOB vs BLOB datatypes

    Which is the best datatype to use that will hold an input stream or byte stream, CLOB or BLOB?
    Thank you.

    Saber wrote:
    Which is the best datatype to use that will hold an input stream or byte stream, CLOB or BLOB?
    Thank you.CLOB is for character data ... so you'd want a BLOB.
    http://docs.oracle.com/cd/E11882_01/server.112/e26088/sql_elements001.htm#SQLRF50997

  • How to convert CLOB to BLOB with SQL Developer migration wizard?

    Hi,
    According to our requirement, we need to only migrate data from SQL Server 2008 to Oracle 11. I use the SQL Developer 3.0.04 migration wizard to do it.
    I do migration from SQL Server (database name: SCDS41P2) to Oracle (User name: HCDS41P2).
    My migration steps are as below: (I need to modify the target schema, so I add the steps 2) and step 3) )
    1) Do migration by SQL Developer migration wizard;
    2) Remove the Converted Database Objects node from migration project;
    3) Re-do convert by SQL Developer migration wizard (contains changing the target schema);
    When do step 1), the DBO_SCDS41P2 user is created automatically. CLOBTOBLOB_SQLDEVELOPER procedure is also created in this user.
    I continued to run step 2) and step 3) with online mode. And find the table data which contains BLOB column can be moved into the target table. But from the Logging Page, I can't see the other detailed error info, so that I can't check which tables don't move data successfully.
    Could you please tell me where the detail log file (e.g. contains every table's migration status) is if I use the online mode?
    Additional, If I use offline mode to do step 3), I found the CLOB data can't be converted into BLOB automatically. Because in the load script (that is oracle_ctl.bat), only copy the source data to the CLOB column. After copy, it don't deal with the converting from CLOB to BLOB.
    So could you please tell me how to convert CLOB to BLOB with offline mode?
    Thanks so much.

    Hi,
    For your first question about logging - after the migration there will be an entry in the right hand panel for the migration project. If you open this there are various fields that give information about the status of each part of the migration. Does this give you the information you need ?
    For the second problem about offline moving blob data have a look at the SQL*Developer documentation -
    Oracle® SQL Developer User’s Guide Release 3.0
    in the section -
    2.2.8.1.4 Populating the Destination Database Using the Data Files
    which describes the problem and how to get round it.
    Regards,
    Mike
    Edited by: mkirtley on Aug 12, 2011 10:49 AM

Maybe you are looking for

  • Sceduling as per the delivery confirmation date in sales order

    Hi, I am working with planning strategy 50 and using availabilty check as per ATP. When I create the sales order and check the availabilty, system confirms the delivery after TRLT(current date+TRLT).But when I run MRP,system creates a planned order o

  • MB5B report missing custom fields in background execution

    Hi, I have added few fields in MB5B transaction, when I run transaction in foreground the new fields I am getting in the report output but when I run report in foreground I am not getting custom fields in the spool. Please let me know why I am not ge

  • ICloud disaster destroyed all my Pages work on the iPad!

    I have an IPad 2 with Pages that I have used for months to write business articles and research papers for publication. I have been using iCloud to synch it through a single user account. Last week, I was forced to upgrade my iMac to Lion because cor

  • Integration of MS Active Directory Server & SUN ONE DS 4.1

    I am planning to setup an integration bridge between MS Active Directory and iPlant Directory Server. User sign on information needs to be synched up between the two directories - is there any way to do this ? Thanks

  • Custom metadata interface definition is not valid

    I have a new problem :( When I trying to import data objects from MySQL platform I have a subject error message: Custom metadata interface definition is not valid. In google search havn't result What this error means and how to fixing? I'm looking th