Using CLOB as a VARCHAR2 to write a string

Hello everyone:
I have this situation:
After a query, i need to order the query rows in a table. To do this, i write a string using HTML format. Then, i send the string (message) by email, and i save the same in a table (database).
The message, must be 32767 as a maximun number of characters. Because, the message is a VARCHAR2.
When the number of characters is greater than 32767, in can't use this way.
So, i trying to use a CLOB datatype, but i don't know how to write the string and then, send it by email.
I wrote this code:
xSGLOSA_UNO$ CLOB;
xSGLOSA_UNO$ := '<table border="1"><tr>FECHA DE PROCESOS CORRECTAS</tr>';
xSGLOSA_UNO$ := xSGLOSA_UNO$ || '<tr><td>Rut Operador</td><td>Nombre</td><td>Proceso</td><td>Fecha Proceso</td></tr>';
BEGIN
FOR CONSULTA_UNO IN(
SELECT
FPR_NRUTOPERADOR,
OPE_SNOMBRE,
FPR_SCODPROCESO,
FPR_DFHOPROCESO
FROM
FECHAS_PROCESO,
OPERADOR
WHERE
TRUNC(FPR_DFHOPROCESO) = TRUNC(SYSDATE)
LOOP
xSGLOSA_UNO$ := xSGLOSA_UNO$ ||  '<tr><td>' || CONSULTA_UNO.FPR_NRUTOPERADOR || '</td><td>' || CONSULTA_UNO.OPE_SNOMBRE || '</td><td>' || CONSULTA_UNO.FPR_SCODPROCESO || '</td><td>' || CONSULTA_UNO.FPR_DFHOPROCESO || '</td></tr>';
END LOOP;
xSGLOSA_UNO$ := xSGLOSA_UNO$ || '</table>';
EXCEPTION
WHEN OTHERS THEN
NUMERROR$ := SQLCODE;
MSJERROR$ := '[NES$FECHA_PROCESOS] FECHAS CORRECTAS (' || SQLERRM || ')';
RETURN;
END;
And i have this error:
[NUMERROR$:=-6502], [MSJERROR$:=[NES$FECHA_PROCESOS] FECHAS CORRECTAS (ORA-06502: PL/SQL: error  numérico o de valor)]
Please, help me with this issue. I am new in Oracle, and i don't have idea the real reason for this.
Thank you for support.

Now... when you do things like:
xSGLOSA_UNO$ := xSGLOSA_UNO$ || '</table>';
then you are concatenating a CLOB (xSGLOSA_UNO$) to a VARCHAR2 ('</table>') which can be done by either convert the clob to varchar2 or the varchar2 to clob before concatenating. || is a overloaded function which accepts two varchar2 or two clob parameters (amongst others). As the CLOB gets bigger than 32k you cannot just let oracle decide how to convert so, you should do:
xSGLOSA_UNO$ := xSGLOSA_UNO$ || TO_CLOB('</table>');
instead.
And this at every place where you concatenate
eg here too:
xSGLOSA_UNO$ := xSGLOSA_UNO$ || TO_CLOB('<tr><td>') || CONSULTA_UNO.FPR_NRUTOPERADOR || TO_CLOB('</td><td>') || CONSULTA_UNO.OPE_SNOMBRE || TO_CLOB('</td><td>') || CONSULTA_UNO.FPR_SCODPROCESO || TO_CLOB('</td><td>') || CONSULTA_UNO.FPR_DFHOPROCESO || TO_CLOB('</td></tr>');
I don't know the datatypes of CONSULTA_UNO.FPR_NRUTOPERADOR and the other components used...if they are VARCHAR then convert, if they are CLOB then let them like they are.
hth

Similar Messages

  • Problem in using CLOB Data from a Data and exporting into File

    Hi,
    UTL_FILE Error Occured while using UTL_FILE with CLOB Data.
    UTL_FILE: A write error occurred.
    The Below Code is for reference:
    DECLARE
    C_AMOUNT CONSTANT BINARY_INTEGER := 32767;
    L_BUFFER VARCHAR2(32767);
    L_CHR10 PLS_INTEGER;
    L_CLOBLEN PLS_INTEGER;
    L_FHANDLER UTL_FILE.FILE_TYPE;
    L_POS PLS_INTEGER := 1;
    BEGIN
         FILE_NAME:=UTL_FILE.FOPEN('EXPORT_DIR','EXPORT_FILE'||'.sql','W');
         FOR C1_EXP IN (SELECT INSERT_STRING FROM EXPORTED_DUMP) LOOP
         L_CLOBLEN := DBMS_LOB.GETLENGTH(C1_EXP.INSERT_STRING);
         DBMS_OUTPUT.PUT_LINE('THE CLOB LEN '||L_CLOBLEN);
         DBMS_OUTPUT.PUT_LINE('THE POSITION '||L_POS);
         WHILE L_POS < L_CLOBLEN LOOP
    L_BUFFER := DBMS_LOB.SUBSTR(C1_EXP.INSERT_STRING, C_AMOUNT, L_POS);
         DBMS_OUTPUT.PUT_LINE('THE BUFFER IS '||L_BUFFER);
    EXIT WHEN L_BUFFER IS NULL;
    UTL_FILE.PUT_LINE(FILE_NAME, C1_EXP.INSERT_STRING);
    L_POS := L_POS + LEAST(LENGTH(L_BUFFER)+1,c_amount);
    END LOOP;
         END LOOP;
    UTL_FILE.FCLOSE(FILE_NAME);
    EXCEPTION
    WHEN UTL_FILE.INTERNAL_ERROR THEN
    DBMS_OUTPUT.PUT_LINE ('UTL_FILE: An internal error occurred.');
    UTL_FILE.FCLOSE_ALL;
    WHEN UTL_FILE.INVALID_FILEHANDLE THEN
    DBMS_OUTPUT.PUT_LINE ('UTL_FILE: The file handle was invalid.');
    UTL_FILE.FCLOSE_ALL;
    WHEN UTL_FILE.INVALID_MODE THEN
    DBMS_OUTPUT.PUT_LINE ('UTL_FILE: An invalid open mode was given.');
    UTL_FILE.FCLOSE_ALL;
    WHEN UTL_FILE.INVALID_OPERATION THEN
    DBMS_OUTPUT.PUT_LINE ('UTL_FILE: An invalid operation was attempted.');
    UTL_FILE.FCLOSE_ALL;
    WHEN UTL_FILE.INVALID_PATH THEN
    DBMS_OUTPUT.PUT_LINE ('UTL_FILE: An invalid path was give for the file.');
    UTL_FILE.FCLOSE_ALL;
    WHEN UTL_FILE.READ_ERROR THEN
    DBMS_OUTPUT.PUT_LINE ('UTL_FILE: A read error occurred.');
    UTL_FILE.FCLOSE_ALL;
    WHEN UTL_FILE.WRITE_ERROR THEN
    DBMS_OUTPUT.PUT_LINE ('UTL_FILE: A write error occurred.');
    UTL_FILE.FCLOSE_ALL;
    WHEN OTHERS THEN
    DBMS_OUTPUT.PUT_LINE ('Some other error occurred.');
    UTL_FILE.FCLOSE_ALL;
    END;

    Hi user598986!
    OK, I understood that there is a problem with your code. But please would you be so kindly to tell us here what error exactly happens (the errormessage). Mabay after that someone will be able to help you.
    yours sincerely
    Florian W.
    P.S. If you enclose your code into tags it will be shown formated.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • Opening a ref cursor using CLOB variable

    Is there any way to open a ref cusor using CLOB variable.
    When I am opening on CLOB variable , I am getting an error like 'Missing Expression'
    Please help me

    For 10g...
    SQL> ed
    Wrote file afiedt.buf
      1  declare
      2    v_large_sql  CLOB;
      3    v_num        NUMBER := 0;
      4    v_upperbound NUMBER;
      5    v_sql        DBMS_SQL.VARCHAR2S;
      6    v_cur        INTEGER;
      7    v_ret        NUMBER;
      8  begin
      9    -- Build a very large SQL statement in the CLOB
    10    LOOP
    11      IF v_num = 0 THEN
    12        v_large_sql := 'CREATE VIEW vw_tmp AS SELECT ''The number of this row is : '||to_char(v_num,'fm0999999')||''' as col1 FROM DUAL';
    13      ELSE
    14        v_large_sql := v_large_sql || ' UNION ALL SELECT ''The number of this row is : '||to_char(v_num,'fm0999999')||''' as col1 FROM DUAL';
    15      END IF;
    16      v_num := v_num + 1;
    17      EXIT WHEN DBMS_LOB.GETLENGTH(v_large_sql) > 40000 OR v_num > 800;
    18    END LOOP;
    19    DBMS_OUTPUT.PUT_LINE('Length:'||DBMS_LOB.GETLENGTH(v_large_sql));
    20    DBMS_OUTPUT.PUT_LINE('Num:'||v_num);
    21    --
    22    -- Now split that large SQL statement into chunks of 256 characters and put in VARCHAR2S array
    23    v_upperbound := CEIL(DBMS_LOB.GETLENGTH(v_large_sql)/256);
    24    FOR i IN 1..v_upperbound
    25    LOOP
    26      v_sql(i) := DBMS_LOB.SUBSTR(v_large_sql
    27                                 ,256 -- amount
    28                                 ,((i-1)*256)+1 -- offset
    29                                 );
    30    END LOOP;
    31    --
    32    -- Now parse and execute the SQL statement
    33    v_cur := DBMS_SQL.OPEN_CURSOR;
    34    DBMS_SQL.PARSE(v_cur, v_sql, 1, v_upperbound, FALSE, DBMS_SQL.NATIVE);
    35    v_ret := DBMS_SQL.EXECUTE(v_cur);
    36    DBMS_OUTPUT.PUT_LINE('View Created');
    37* end;
    SQL> /
    Length:40015
    Num:548
    View Created
    PL/SQL procedure successfully completed.
    SQL> select count(*) from vw_tmp;
      COUNT(*)
           548
    SQL> select * from vw_tmp where rownum <= 10;
    COL1
    The number of this row is : 0000000
    The number of this row is : 0000001
    The number of this row is : 0000002
    The number of this row is : 0000003
    The number of this row is : 0000004
    The number of this row is : 0000005
    The number of this row is : 0000006
    The number of this row is : 0000007
    The number of this row is : 0000008
    The number of this row is : 0000009
    10 rows selected.
    SQL>

  • Error when using CLOB

    Problem While using CLOB/BLOB datatype:
    We have created a directory in E drive and created a directory alias in oracle.
    to read the data from CLOB data type we have to write a PL/SQL code.
    But i am getting an errorin the block .ie non existent directory or file....
    ORA-22285: non-existent directory or file for FILEOPEN operation
    ORA-06512: at "SYS.DBMS_LOB", line 475
    ORA-06512: at line 8
    but the directory and file is there with all permissions.
    null

    Hi,
    Your buffer size should be the clob size.
    char[] buffer = new char[c_lob.getBufferSize()];
    Also, set the value for i as -1.
    You could see the sample on OTN for help:
    http://www.oracle.com/technology/sample_code/tech/java/sqlj_jdbc/files/advanced/LOBSample/Readme.html
    Thanks,
    Rashmi

  • EBS - 12  XMLP (5.6.3)  cannot use CLOBS  ?????

    Hello: I am being told by Metalink Support the following:
    " Bi Publisher 5.6.3 (10.1.3.2.0) does not have native support for CLOB.
    This comes in BI Publisher Enterprise 10.1.3.3.0.
    There are no plans at this time to upgrade EBS to higher versions of BI Publishe
    r code."
    So for EBS - 12, I cannot use CLOBS ?????
    How am I supposed to write reports that use large CLOBS ?
    Also, there was some mention about leaving out DataStructures in templates for CLOBS ?
    Anyone with experience in this situation, please help ...
    Yesh

    Hi Yesh,
    There is a BI (XML) Publisher Desktop for 5.6.3 that you can use, and you can use the latest versions of the desktop to build your layouts, but be aware the later versions may have more supported features not present in 5.6.3. I use 10.1.3.something for developing EBS reports and have standalone BIP Server on my desktop for checking features against.
    Data Templates are not the only way to register BIP reports in the EBS Concurrent Manager.
    You can use **any** program as long as it does actually output XML and you have set the "Output" to XML.
    The choice is up to you as to how you extract your data to XML - whatever works!
    I'm not sure what all your CLOB issues are, but creating the XML that have CLOBS shouldn't cause issues (unless you are forced by something to use dataTemplates).
    Gareth

  • Using CLOB data type - Pros and Cons

    Dear Gurus,
    We are designing a database that will be receiving comments from external data source. These comments are stored as CLOB in the external database. We found that only 1% of incoming data will be larger than 4000 characters and are now evaluating the Pros and Cons of storing only 4000 characters of incoming comments in VARCHAR2 data type or using CLOB data type.
    Some of the concerns brought up during discussion were:
    - having to store CLOBs in separate tablespace;
    - applications, such Toad require changing defaults settings to display CLOBs in the grid. Default value is not to display them;
    - applications that build web page with CLOBs will be struggling to fit 18 thousand chararcters of which 17 thousand are blank lines;
    - cashing CLOBs in memory will consume big chunk of data buffers which will affect performance;
    - to manipulate CLOBs you need PL/SQL anonymous block or procedure;
    - bind variables cannot be assigned CLOB value;
    - dynamic SQL cannot use CLOBs;
    - temp tables don't work very well with CLOBs;
    - fuzzy logic search on CLOBs is ineffective;
    - not all ODBC drivers support Oracle CLOBs
    - UNION, MINUS, INTERSECT don't work with CLOBs
    I have not delt with CLOB data type in the past, so I am hoping to hear from you of any possible issues/hastles we may encounter?

    848428 wrote:
    Dear Gurus,
    We are designing a database that will be receiving comments from external data source. These comments are stored as CLOB in the external database. We found that only 1% of incoming data will be larger than 4000 characters and are now evaluating the Pros and Cons of storing only 4000 characters of incoming comments in VARCHAR2 data type or using CLOB data type.
    Some of the concerns brought up during discussion were:
    - having to store CLOBs in separate tablespace;They can be stored inline too. Depends on requirements.
    - applications, such Toad require changing defaults settings to display CLOBs in the grid. Default value is not to display them;Toad is a developer tool so that shouldn't matter. What should matter is how you display the data to end users etc. but that will depend on the interface. Some can handle CLOBs and others not. Again, it depends on the requirements.
    - applications that build web page with CLOBs will be struggling to fit 18 thousand chararcters of which 17 thousand are blank lines;Why would they struggle? 18,000 characters is only around 18k in file size, that's not that big to a web page.
    - cashing CLOBs in memory will consume big chunk of data buffers which will affect performance;Who's caching them in memory? What are you planning on doing with these CLOBs? There's no real reason they should impact performance any more than anything else, but it depends on your requirements as to how you plan to use them.
    - to manipulate CLOBs you need PL/SQL anonymous block or procedure;You can manipulate CLOBs in SQL too, using the DBMS_LOB package.
    - bind variables cannot be assigned CLOB value;Are you sure?
    - dynamic SQL cannot use CLOBs;Yes it can. 11g supports CLOBs for EXECUTE IMMEDIATE statements and pre 11g you can use the DBMS_SQL package with CLOB's split into a VARCHAR2S structure.
    - temp tables don't work very well with CLOBs;What do you mean "don't work well"?
    - fuzzy logic search on CLOBs is ineffective;Seems like you're pulling information from various sources without context. Again, it depends on your requirements as to how you are going to use the CLOB's
    - not all ODBC drivers support Oracle CLOBs not all, but there are some. Again, it depends what you want to achieve.
    - UNION, MINUS, INTERSECT don't work with CLOBsTrue.
    I have not delt with CLOB data type in the past, so I am hoping to hear from you of any possible issues/hastles we may encounter?You may have more hassle if you "need" to accept more than 4000 characters and you are splitting it into seperate columns or rows, when a CLOB would do it easily.
    It seems as though you are trying to find all the negative aspects of CLOBs and ignoring all the positive aspects, and also ignoring the negative aspects of not using CLOB's.
    Without context you're assumptions are just that, assumptions, so nobody can tell you if it will be right or wrong to use them. CLOB's do have their uses, just as XMLTYPE's have their uses etc. If you're using them for the right reasons then great, but if you're ignoring them for the wrong reasons then you'll suffer.

  • Use CLOB & Ref Cursor

    Hi,
    Can some one help.
    I am getting string more than 32767 char so I want to use CLOB but I am unable to use in ref Cursor.
    CREATE OR REPLACE PROCEDURE PM.PROC_CURSOR_BTDCS (P_QUERY IN varchar2, P_batchid out Number) AS
    P VARCHAR2(32767);
    P_CURSOR_QUERY SYS_REFCURSOR;
    X_JOBID varchar2(30);
    X_BATCHID VARCHAR2(1000);
    X_CREF VARCHAR2(10000);
    X_CLIENTREF VARCHAR2(10000);
    X_CLIENTID NUMBER;
    X_USERID NUMBER;
    X_RDATE varchar2(40);
    X_DDATE varchar2(40);
    X_STAGE NUMBER;
    X_DIFF NUMBER;
    X_CLIENTDUEDATE varchar2(40);
    X_ASSETID NUMBER;
    X_MODEID NUMBER;
    p_o_error VARCHAR2(100);
    p_o_status NUMBER;
    BEGIN
    P := 'SELECT DISTINCT JOBID,CLID,USERID,STAGE,
    GET_CSV_DATA(CURSOR (SELECT CREF FROM ('|| P_QUERY ||') WHERE jobid =A.JOBID AND CLID=A.CLID AND USERID=A.USERID AND RDATE=A.RDATE AND DDATE=A.DDATE AND STAGE=A.STAGE AND ASSETID=A.ASSETID AND CLDATE=A.CLDATE AND DIFF=A.DIFF)) C_CREF,
    GET_CSV_DATA(CURSOR (SELECT BATCHID FROM ('|| P_QUERY ||') WHERE jobid =A.JOBID AND CLID=A.CLID AND USERID=A.USERID AND RDATE=A.RDATE AND DDATE=A.DDATE AND STAGE=A.STAGE AND ASSETID=A.ASSETID AND CLDATE=A.CLDATE AND DIFF=A.DIFF)) C_BATCH,
    GET_CSV_DATA(CURSOR (SELECT Crefname FROM ('|| P_QUERY ||') WHERE jobid =A.JOBID AND CLID=A.CLID AND USERID=A.USERID AND RDATE=A.RDATE AND DDATE=A.DDATE AND STAGE=A.STAGE AND ASSETID=A.ASSETID AND CLDATE=A.CLDATE AND DIFF=A.DIFF)) C_CLIENTREF
    ,DIFF,cldate,ASSETID
    ,RDATE,DDATE,MODEID
    FROM('||P_QUERY||') A';
    --INSERT INTO FROG VALUES(P,sysdate);
    OPEN P_CURSOR_QUERY FOR P;
    LOOP
    FETCH P_CURSOR_QUERY INTO X_JOBID
    ,X_CLIENTID,X_USERID,X_STAGE,
    X_CREF,X_BATCHID,X_CLIENTREF,X_DIFF,
    X_CLIENTDUEDATE,
    X_assetid,X_RDATE,X_DDATE,X_MODEID;
    EXIT WHEN P_CURSOR_QUERY%NOTFOUND;
    -- INSERT INTO FROG VALUES (X_CREF);
    Proc_batchchangestage_upd (X_JOBID,X_BATCHID,X_CREF,X_CLIENTREF,X_userid,X_clientid,X_RDATE,
    X_DDATE,
    X_stage,
    X_CLIENTDUEDATE,
    X_diff,
    X_assetid,X_MODEID,p_batchid,
    p_o_error,
    p_o_status);
    END LOOP;
    CLOSE P_CURSOR_QUERY;
    COMMIT;
    END;

    It would be helpful to indicate the error you're getting and the line where you're getting the error.
    I will assume that your goal is to construct a SQL query > 32k, store that query in p, and open a cursor using p. In order to do that, you'd have to use the DBMS_SQL package, which is going to complicate your life rather significantly.
    That said, it's far from obvious to my why the SQL statement needs to exceed 32k. At a minimum, concatentaing P_QUERY three times would seem unnecessary. If the text of P_QUERY exceeds 10,000 characters, I would really tend to suspect that you've done something wrong there and would benefit from simplifying the query or at least using a couple views.
    Justin

  • Using Clob with TopLink 9.0.4.5 and Oracle 10g RAC

    I am trying to store an XML file in a Clob type field of a DB table using TopLink 9.0.4.5 and Oracle 10g RAC and need some guidance about how to do it. I got some directions to start it with the Tip "How-To: Map Large Objects (LOBs) to Oracle Databases with OracleAS TopLink" but still need some more helps.
    When using the Oracle JDBC OCI driver, the tip gives the code block for a Clob field:
    DirectToField scriptMapping = new DirectToField();
    scriptMapping.setAttributeName("script");
    scriptMapping.setFieldName("IMAGE.SCRIPT");
    descriptor.addMapping(scriptMapping);
    As I understand, TopLink creates instances of the Descriptor class at run time for each of the descriptor files and stores them in a database session, where is the proper place (in SessionEvent of TopLinkSessionEventHandler?) for me to get a reference to such an instance of my Descriptor class in Java code so that I can add the above mentioned additional Mapping? Are the above String values of "script" and "IMAGE.SCRIPT" predefined in TopLink API? Can I accomplish the same thing just using the TopLink Workbench tool instead? If yes, please advise the detailed steps to do so.
    The tip also states to call the following code in case of using Clob:
    DatabaseLogin login = session.getLogin();
    login.useStringBinding();
    Should the above 2 lines of code be called after the following lines of code?
    SessionManager sessionManager = SessionManager.getManager();
    Server serverSession = (Server)sessionManager.getSession("MY_SESSION_NAME");
    Besides the above extra coding for the Session and Descriptor Mapping, is there any special handling in between Data model and DB table mapping? Can I map a Java String type to a DB Clob field using the Direct-to-field mapping?
    Appreciate any help.

    Never mind ....... I had already figured it out .....

  • Use of Selection Rule in Report Writer.

    Hello Everybody,
    I am trying to make use of selection rule in report writer.   We have a mixed chart of accounts using both IFRS and USGAAP account.  Distinction between USGAAP and IFRS is based on certain value in gl account master data.  Using report writer rule I wish to exclude IFRS account for a specfic report.
    For example
    REPORT = X = Rule to restrict selection to only USGAAP account
    REPORT = Y = Rule to restrict selection to only IFRS account.
    I have created a rule and tried to build user-exit around it.  However during the callup of the selection rule no values are transferred to user-exit and therefore the ABAP consultant is not able to write any specific code.
    Request your inputs on usage of selection rules in report writer.
    Regards
    Jayesh.

    Hi Jayesh,
    Please have a look at the below attachment.
    [http://help.sap.com/saphelp_470/helpdata/en/5b/d22e3843c611d182b30000e829fbfe/content.htm]
    Warm regards,
    Murukan Arunachalam

  • Using CLOB type in AQ

    HI All
    I have AQ table and queue of object type. The object contains only one CLOB type field.
    I tried to enqueue some message using OCI functions but I got error message:
    OCI Error <25215> - ORA-25215: user_data type and queue type do not match.
    I'm using struct defined as below:
    struct message
    OCILobLocator * data;
    Does anyone know how to use CLOB object with OCI functions or maybe there is better type to enqueue hude messages??
    Thank you.

    U just have to define a rule when creating a subscriber to your queue.

  • Can't use clob and blob

    I just created a new database using dbca with General Purpose as the template, as I've done before. All went well until I tried to create tables that used clob or blob datatypes. I kept getting the error "ORA-03001: unimplemented feature".
    What happened? Was the database created improperly? Is there a way to correct this without recreating the database?
    Thanks

    I just created a new database using dbca with General
    Purpose as the template, as I've done before. All
    went well until I tried to create tables that used
    clob or blob datatypes. I kept getting the error
    "ORA-03001: unimplemented feature".
    I have the same problem but only if I assign a tablespace to the table but not if i leave it to the default tablespace.

  • How to use clob or blob data type in OWB

    how to use clob or blob data type in OWB?
    if OWB not surport these data type,how can i extract the large data type from data source

    The same question was asked just two days ago No Data Found: ORA-22992
    Nikolai Rochnik

  • How to use CLOB

    When I use CLOB like
    CREATE OR REPLACE PROCEDURE Example_1b(retData out clob) IS
    src_lob cLOB;
    BEGIN
    SELECT b_lob INTO src_lob
    FROM lob_table
    DBMS_LOB.APPEND(dest_lob, src_lob);
    COMMIT;
    EXCEPTION
    WHEN some_exception
    THEN handle_exception;
    END;
    There are thousand records in lob_table.When I run the procedure,It's very very slowwer !
    How to improve it?

    I assume there are some lines missing here.
    >
    1 CREATE OR REPLACE PROCEDURE Example_1b(retData out clob) IS
    2 src_lob cLOB;
    3 BEGIN
    4 SELECT b_lob INTO src_lob
    5 FROM lob_table
    6 DBMS_LOB.APPEND(dest_lob, src_lob);
    7 COMMIT;
    8 EXCEPTION
    9 WHEN some_exception
    10 THEN handle_exception;
    11 END;
    [unquote]
    Is there a where clause missing after line 5 or is it your intent to select your whole clob table? If it is, then you should use a curser like so:
    >
    1 CREATE OR REPLACE PROCEDURE Example_1b(retData out clob) IS
    2 CURSOR c1 is SELECT b_lob
    3 FROM lob_table;
    4
    5 src_lob cLOB;
    6 BEGIN
    7 for src_lob in c1 loop
    6 DBMS_LOB.APPEND(dest_lob, src_lob);
    7 end loop;
    8 EXCEPTION
    9 WHEN some_exception
    10 THEN handle_exception;
    11 END;
    [unquote]
    Please note, I removed the commit at line 7 as it was unecessary in your procedure (you showed no inserts, updates, or deletes).

  • How to store a large document in Oracle9i using CLOB!?

    Hi all,
    I want to store a large document(about 10mb) in Oracle9i using SQL*PLUS. How to store it using CLOB in Oracle9i!?
    What the necessary steps to perform!?
    Thanks

    Just use the report's CUID or ID for the iDocID parameter, and give all necessary users the appropriate rights to the inbox where the report is located.
    repoType is a legacy parameter, this will have no effect.
    http://help.sap.com/businessobject/product_guides/boexir31/en/xi3-1_url_reporting_opendocument_en.pdf

  • Wich pen do you guys recommend to use on ipad air 2 to write and draw?

    Wich pen do you guys recommend to use on ipad air 2 to write and draw?

    Im new at ipad.
    I have download the Paper, but I just want to use a pen with all applications.
    If possible a pen that doesn´t leave the hand mark´s on the screen.
    Sorry about the english!

Maybe you are looking for

  • Output linked pages as PDF

    My boss and I have simialr equipment and we each have full installs of CS6. We each take the same 5 Mb size firework png file.  It has 71 pages, with many links. When I output the file as PDF, I get a file that is 82 Mb in size. When my boss does it,

  • Imovie -180 error

    Hi I have an event in iMovie that is 9.21min long and consists of movie files (from digital SLR), images (photos) and audio (voice and music). I want to upload it to youtube, but for some reason it is not recognising my password (which is correct). I

  • Adhoc Step runtime excution process.

    Hi Friends,     I have a scenario where AdHoc step is being used. As per my knowledge till now this step is used for runtime selection of process (i.e. which work flow we want to continue at run time). And for selecting that wf we have to goto graphi

  • FJS-00003  TypeError: fsTableSplit for system copy and unicode conversion

    Dear Sir: Current I want to do the system copy for unicode conversion, but i go the following message on phase table splitting preparation. did you got this message before? Thanks! Br, GX ERROR      2009-02-05 18:03:12.214 [iaxxejsbas.cpp:204] FJS-00

  • Simplest way to sign a JAR?

    I made an applet using Eclipse that pulls information from a website while running. Apparently this needs to be signed before it works online -- what is the quickest, easiest way to sign it? I'm one of the few people who are going to be using this ap