Edit CLOB value

Hi all!
I'm sure this is something simple, but I just can't seem to get it and have been beating my head against a wall for several days...Help! :)
I have a clob that contains the following:
<?xml version="1.0"?>
<PARMS>
<P_BOOK_TYPE_CODE>ASSETS INTERNAL</P_BOOK_TYPE_CODE>
<P_STATE>SD</P_STATE>
<P_BEG_DATE_EFFECTIVE>01-JAN-1990</P_BEG_DATE_EFFECTIVE>
<P_END_DATE_EFFECTIVE>31-DEC-2007</P_END_DATE_EFFECTIVE>
</PARMS>
I want to remove the first part of it
'<?xml version="1.0"?>'
How do I code this? I've been trying with dbms_lob.WRITE but I just can't seem to find the right parameter values...
Thanks!!
Janel

Hi,
Have you tried dbms_lob.erase ?
PROCEDURE DBMS_LOB.ERASE
(lob_loc IN OUT CLOB CHARACTER SET ANY_CS,
amount IN OUT INTEGER,
offset IN INTEGER := 1);
regards
Gokhan

Similar Messages

  • Not able to edit the value options in LKM

    Hi
    I have recently upgraded to ODI 11g .
    In that we are not able to edit the value options in LKM.
    (i.e.. editor window is not appearing, not able to edit the text.
    Please let me know the solution .
    Thanks

    We were using JDK1.6.0_29 and it was not supporting ODI 11.1.1.5, so we have uninstalled the JDK1.6.0_29 and reinstall the JDK1.6.0_11.This solves our issue.
    Thanks a lot!!

  • I'm using TestStand/Labview to do a string value test. Is there any way to use a variable in the edit string value test?? This forces you to hard code a string to test against.

    I'm using TestStand 2.0/Labview 6i to do a string value test. Is there any way to use a string variable in the edit string value test instead of an actual string?? This forces you to hard code a string to test against.

    Hi ART,
    You can also use the LimitLoader step to load your string into to step similar to the Numeric Step type.
    There should be an example of this in the Resource Library | TestStand
    Regards
    Ray Farmer
    Regards
    Ray Farmer

  • How to set a clob value to a hidden field

    I have a function returning a clob value . Please let me know if there is a way to set a hidden variable with a clob value.

    Hi,
    This functionality is known to be very important and is a key part of the next major release of the JRC planned for the first half of 2008.
    Regards,
    <p>Blair Wheadon</p>
    <p>Product Manager, Crystal Reports</p>

  • User should not be able to edit characteristics Value

    Hi Friends
    I have requirement where in a user creates a document with Two characteristics assigned to that Document.
    Say CHAR1 and CHAR2.
    When he creates DIR , He assigns value to these characteristics
    CHAR1 = 666454
    CHAR2 = 55333
    No I want No other user to be able to change the values assigned to both CHAR1 and CHAR2.
    Can this be possible.
    With Regards
    Mangesh Pande

    Hi Mangesh,
    I think the easiest way to find an authorization object which prevents users to edit characteristic values would be to made an authorization trace in transaction ST01. For further information please see the following link:
    http://wiki.sdn.sap.com/wiki/display/PLM/AuthorizationTrace-+ST01
    This trace lists all checked authorization objects and you should be able to identify a suitbale object for restricting edit permission for classification values.
    Best regards,
    Christoph

  • How to create and send clob value to SP?

    Hi,
    Does any one of an example of how to create and send
    a clob value(as a IN parameter to storedprocedure) from JAVA to
    the StoredProcedure. I need the JAVA code.
    null

    Hi 
    Following is sample code you can use.
    DECLARE @testID Int
    DECLARE @year int 
    DECLARE @testtype datatype
    SELECT @testtype=testtype from yourTable Where Your condition
    SELECT  @year= year from yourTable Where your conditon (you need to make sure you assign or get @year variable )
    SELECT @testid=id from test where  year=@year and testtype=@testtype)
    Hope this helps
    Regards

  • Unable to write CLOB value larger then approx. 97KB

    Hello,
    I am writing the CLOB value using the java JDBC bridge (9.0.1) to the DB (8.1.6). I managed to write CLOB values ok, but when I try to write text larger then 97KB it throws the following error:
    java.io.IOException: ORA-00600: kód vnitønà chyby (internal error code in english), argumenty: [kdlseek-kgbtnscb], [], [], [], [], [], [], []
    ORA-06512: na "SYS.DBMS_LOB", line 708
    ORA-06512: na line 1
    at oracle.jdbc.dbaccess.DBError.SQLToIOException(DBError.java:618)
    at oracle.jdbc.driver.OracleClobWriter.flushBuffer(OracleClobWriter.java:201)
    at oracle.jdbc.driver.OracleClobWriter.flush(OracleClobWriter.java:161)
    at com.trask.edoceo.sql.OracleConnection$OraclePreparedStatement.getCLOB(OracleConnection.java:103)
    at com.trask.edoceo.sql.OracleConnection$OraclePreparedStatement.setCharacterStream(OracleConnection.java:85)
    at ...
    I use the Prepared statement function setClob and for writing I create the CLOB object using the following method:
    private CLOB getCLOB(String text, Connection conn) throws SQLException {
    CLOB tempClob = null;
    try {
    // If the temporary CLOB has not yet been created, create new
    tempClob = CLOB.createTemporary(conn, true, CLOB.DURATION_SESSION);
    // Open the temporary CLOB in readwrite mode to enable writing
    tempClob.open(CLOB.MODE_READWRITE);
                        // Get the output stream to write
    Writer tempClobWriter = tempClob.getCharacterOutputStream();
    // Write the data into the temporary CLOB
    tempClobWriter.write(text);
    // Flush and close the stream
    tempClobWriter.flush();
    tempClobWriter.close();
    // Close the temporary CLOB
    tempClob.close();
    } catch (SQLException sqlexp) {
    tempClob.freeTemporary();
    sqlexp.printStackTrace();
    } catch (Exception exp) {
    tempClob.freeTemporary();
    exp.printStackTrace();
    return tempClob;
    Under the 97KB boundary everything works fine. Is the limit hidden in the JDBC drivers (I tried the newer drivers, but they throw the END OF TNS DATA CHANNEL error) or somewhere in the oracle DB settings?
    I am using JDK 1.3.1 Win2000 and the oracle DB resides on another machine then the application.
    I tried to append the error dump from the DB, but it has 1.5MB of text :-(
    Thanks for your help.
    Jan Antos.
    [email protected]

    This forum is meant for discussions about OTN content/site and services.
    Questions about Oracle products and technologies will NOT be answered in this forum. Please post your product or technology related questions in the appropriate product or technology forums, which are monitored by Oracle product managers.
    Product forums:
    http://forums.oracle.com/forums/index.jsp?cat=9
    Technology forums:
    http://forums.oracle.com/forums/index.jsp?cat=10
    As a general guideline, please first search the forum to see if your question is already answered. You will find answers for the most frequently asked questions by simply searching the forum. This will help you to find the answer right away and will save time for all of us.

  • Displaying a CLOB value on a report page in an application from a DB-link

    Hello, i am having trouble displaying a CLOB value from a DB-Link, i have tried using temporary local tables, but they didnt work.
    I am now trying to use a collection (page process) to display the CLOB column's data from the link but to no avail :(
    This is my collection source:
    declare
      col1   number;
      col2   date;
      col3   clob;
    begin
      apex_collection.create_or_truncate_collection('LOBCOLLECTIONPLAN');
      for r in ( select * from TABLENAME@DB-Link ) loop
        APEX_COLLECTION.ADD_MEMBER('LOBCOLLECTIONPLAN',
        p_c001          => r.col1,
        p_c002          => r.col2,
        p_clob001       => r.col3);
    end loop;
    end;when i run the page it displays 'no data found', yet there is data in the linked DB table.
    Is there anything i am doing wrong?
    Or is there another way around this?
    Thanks in advance

    There used to be a problem with pulling CLOB's through dblinks. I don't know if that is still an issue, but I think it probably is, as that is a 'problem' with the database itself.
    If you run the same SQL query on your local database, getting the CLOB's from a remote database, do you get any errors or do you get all of the data?
    No idea if I'm right or not, but it's something you should be able to test fairly easily.
    Bill Ferguson

  • Edit session value after login

    I would like to edit the session value of a session that is set after a user logs in.
    Problem:
    I have a field 'date of birth' in my database: yyyy-mm-dd, but i need the age value instead in the session.
    I know how to calculate this but that is not the question, i need to know where to edit this value so that after a login the session is set to the age of the user instead of his/her date of birth value from the database.
    I hope you understand.
    Can someone please help me out...
    Thanks,
    Jim

    Hi Jim,
    <br />
    <br />nope, Adobe/Interakt are not participating here.
    <br />
    <br />However, I do *think* that converting these values *upon* login seems quite weird to do -- ADDT´s session variables are based on the "as is" contents of DB table fields, and what you´re asking for is a very special usage scenario which was even never asked for in the Interakt forums, so that´s why assumingly other forum particpants reading this keep scratching their heads as well.
    <br />
    <br />The only approach I can suggest for now, is to convert the session variables *after* login, and that´s quite easily possible -- on that very page that´s going to display the banner, it should be possible to initialize the abovementioned "calculate age from birthday" conversion routine and assign the session variable "current_age" to the PHP variable "$birthday_user", e.g. $birthday_user = $_SESSION['current_age'];
    <br />
    <br />Once you have this clearly assigned, all you´d have to do is to apply a "Show IF conditional region" that´s checking against the $birthday_user value, e.g.
    <br />
    <br /><?php<br />// Show IF Conditional region_check_user_age<br />if ($birthday_user < 20) {<br />?>
    <br />display banner for folks under 20
    <br /><?php<br />// else Conditional region_check_user_age<br />} else { ?>
    <br />display banner for folks older than 20
    <br /><?php }<br />// endif Conditional region_check_user_age<br />?>
    <br />
    <br />As the line breaks in the code posted above will most likely disappear as before, I´m attaching a text-only version
    <br />
    <br />Cheers,
    <br />Günter Schenk
    <br />Adobe Community Expert, Dreamweaver

  • Can Bi Publisher handle CLOB values?

    Hello,
    I've a requirement to generate a letter/report from BI Publisher(Standalone version) in which the Data Template includes a sql query to extract data from table which has clob value? Can Bi Publisher handle clob values? Please guide.
    Thanks.

    Can anyone please advise me if i can create a Data template with SQL query to extract the clob data from a table? and generate a report in pdf format? Am not sure if BI Publisher handles CLOB values?
    My version is Oracle BI Publisher 10.1.3.4.0 (stand alone).
    Please guide.
    Thanks.

  • Editing the values of a JTable

    I am trying to allow the user to edit the values of a JTable. I have captured the event of editing the table, but I can't find out how to know what the new value of cell is... it always gets reverted to the old value.
    I can't find any method or way how to know what the new value is.
    Any help?

    Problem solved ...
    setValueAt() was not overridden ...

  • Getting a Clob Value from an OUT Parameter

    I am having trouble fetching the CLOB Value(an XML Document) from an Out parameter. I have been
    trying to fetch the value into a String, an OracleClob, etc.. no luck still get either an invalid
    cast or a DBNULL value. Is there an example out there for returning and manipulating CLOBS in either VB.NET or in C#.
    Thanks,
    Scott E. Hunley

    Scott,
    Hopefully, this will help:
    ========================== C# code begin ===========================
    using System;
    using System.Data;
    using Oracle.DataAccess.Client;
    using Oracle.DataAccess.Types;
    namespace Test
    class OutClob
    static OracleCommand cmd;
    static void Execute(string sql)
    try
    cmd.CommandText = sql;
    cmd.ExecuteNonQuery();
    catch (Exception e)
    Console.WriteLine(e.Message);
    static void Main(string[] args)
    // connect
    OracleConnection con = new OracleConnection();
    con.ConnectionString = "user id=scott;password=tiger;data source=ora92;";
    con.Open();
    // instantiate the command object
    cmd = new OracleCommand();
    cmd.Connection = con;
    // drop table
    Execute("drop table foo");
    // create table
    Execute("create table foo (num number, xml clob)");
    // insert a row with xml data in a CLOB column
    Execute("insert into foo values (1, '<foo>bar</foo>')");
    // bind and output parameter for an anonymous PL/SQL block
    OracleParameter p1 = cmd.Parameters.Add("p1", OracleDbType.Clob);
    p1.Direction = ParameterDirection.Output;
    // execute the anonymous PL/SQL block which returns a CLOB as an
    // output parameter of type OracleClob
    Execute("begin select xml into :1 from foo where num = 1; end;");
    // Obtain the clob with the proper cast
    OracleClob clob = (OracleClob)p1.Value;
    // print out the XML document
    Console.WriteLine(clob.Value);
    ========================== C# code end ===========================
    Output:
    <foo>bar</foo>

  • Problem inserting clob value into xmltype column

    Hi all,
    I have created a table in XML DB using as:
    CREATE TABLE TransDetailstblCLOB ( id number, data_xml XMLType) XmlType data_xml STORE AS CLOB;
    I am trying to insert large xml data into the data_xml column which is of type XMLTYPE.
    I followed this link (http://www.oracle.com/technology/sample_code/tech/java/codesnippet/xmldb/HowToLoadLargeXML.html) to create a clob object and insert into xml.
    I am getting the following error:
    ORA-31011: XML parsing failed
    ORA-19202: Error occurred in XML processing
    LPX-00229: input source is empty
    Error at line 0
    ORA-06512: at "SYS.XMLTYPE", line 254
    ORA-06512: at line 1
    My code snippet:
    private static CLOB getCLOB(String xmlData, Connection conn) throws SQLException{
         CLOB tempClob = null;
         if(conn==null){
              log.debug("Connection object is null");
              throw new SQLException("Connection object is null");
         try{
         // If the temporary CLOB has not yet been created, create new
         tempClob = CLOB.createTemporary(conn, true, CLOB.MODE_READWRITE);
         // Open the temporary CLOB in readwrite mode to enable writing
         tempClob.open(CLOB.MODE_READWRITE);
         // Get the output stream to write
         writer = tempClob.getCharacterOutputStream();
         writer.write(xmlData);
         } catch(SQLException sqlexp){
              tempClob.freeTemporary();
         sqlexp.printStackTrace();
         } catch(Exception exp){
         tempClob.freeTemporary();
         exp.printStackTrace();
         return tempClob;      
    public static void insertXML(String xmlData, Connection conn){
         CLOB clob = null;
         String query;
         log.debug("Inside insertXML" +xmlData);
         try{
         query = "INSERT INTO TransDetailstbl1(data) VALUES (XMLType(?)) ";// Changed prev TransDetailstbl
         // Get the statement Object
         pstmt = conn.prepareStatement(query);
         //      xmlData is the string that contains the XML Data.
         // Get the CLOB object using the getCLOB method.
         clob = getCLOB(xmlData, conn);
         // Bind this CLOB with the prepared Statement
         pstmt.setObject(1, clob);
         int i =pstmt.executeUpdate();
         log.debug("pstmt.executeUpdate () status ::: "+i);
         // Execute the Prepared Statement
         if (i == 1) {
         log.debug("Record Successfully inserted!");
         } catch(SQLException sqlexp){
         sqlexp.printStackTrace();
         } catch(Exception exp){
         exp.printStackTrace();
         finally{
              try{
                   pstmt.close();
    //           Flush and close the stream
                   writer.flush();
                   writer.close();
              // Close the temporary CLOB
              tempClob.close();
              catch(Exception e)
                   log.debug("Cant close prepared statement.");
                   e.printStackTrace();
    Can anyone help me out?
    Please let me know if any other info is required.
    Regards,
    Robina

    Hi all,
    I now modified the code to write the data using Stream.
    I am getting this error message: SQLException while updateORA-24813: cannot send or receive an unsupported LOB
    On googling it seems the its usually caused when I am using the different versions of oracle on
    server and client.
    My oracle details:
    Database product version : Oracle Database 10g Enterprise Edition Release 10.2.0.3.0 - Production
    With the Partitioning, OLAP and Data Mining options
    JDBC driver name : Oracle JDBC driver
    JDBC driver version : 9.2.0.1.0
    DataStoreHelper name is: com.ibm.websphere.rsadapter.OracleDataStoreHelper@22542254.
    JDBC driver type : thin
    Can anyone tell me how to proceed?
    Thanks

  • APEX and CLOB value in trigger

    Hi,
    I am using APEX 3.2.1 with Oracle 11gR1.
    I have two tables:
    CREATE TABLE "TSI"."ATT_TEST2"
    (     "ID" NUMBER NOT NULL ENABLE,
         "TITLE" VARCHAR2(250 BYTE),
         "TOPIC" CLOB
    and
    CREATE TABLE "TSI"."ATT_TEST2"
    (     "ID" NUMBER NOT NULL ENABLE,
         "TITLE" VARCHAR2(250 BYTE),
         "TOPIC" CLOB
    My trigger is:
    create or replace TRIGGER "TSI"."ATT_TEST_TRG"
    BEFORE INSERT ON ATT_TEST
    FOR EACH ROW
    BEGIN
    SELECT ATT_TEST_SEQ.NEXTVAL INTO :new.ID FROM DUAL;
    insert into att_test2(id, title, topic) values (ATT_TEST_SEQ.NEXTVAL, :new.title, :new.topic);
    END;
    Now if I insert a record to ATT_TEST using SQL Developer ATT_TEST2 gets populated.
    If create an APEX form and try to insert into ATT_TEST i get all the fields inserted into ATT_TEST2 except for the CLOB column. The TOPIC column is not copied into ATT_TEST2.
    Any idea why this works from SQL Developer and not from APEX?
    Thank you

    Hello:
    I believe this behaviour is seen because APEX uses the 'DBMS_LOB' API to update LOB/CLOB columns.For the example posted APEX does something like
    INSERT INTO "ATT_TEST" ( "ID","TITLE","TOPIC") VALUES (:B1 ,REPLACE(:B2 ,'%null%',NULL),EMPTY_CLOB()) RETURNING ROWID INTO :0;
    begin select "TOPIC" into wwv_flow.g_dml_clob_text from "ATT_TEST" where rowid = :p_rowid for update; end;
    begin dbms_lob.write( wwv_flow.g_dml_clob_text, length(wwv_flow.g_dml_varchar32767_text), 1, wwv_flow.g_dml_varchar32767_text ); end;
    varad

  • How to get edited row values from ADF table?

    JDev 11.
    I have a table which is populated with data from Bean.
    I need to save changes after user make changes in any table cell. InputText is defined for table column component.
    I have defined ValueChangeListener for inputText field and AutoSubmit=true. So when user change value in inputText field, method is called:
    public void SaveMaterial(ValueChangeEvent valueChangeEvent) {
    getSelectedRow();
    SaveMaterial(material);
    This method should call getSelectedRow which take values from selected table row and save them into object:
    private Row getSelectedRow(){
    RichTable table = this.getMaterialTable();
    Iterator selection = table.getSelectedRowKeys().iterator();
    while (selection.hasNext())
    Object key = selection.next();
    table.setRowKey(key);
    Object o = table.getRowData();
    material = (MATERIAL) o;
    System.out.println("Selected Material Desc = "+material.getEnumb());
    return null;
    Problem is that getSelectedRow method doesnt get new (edited) values, old values are still used.
    I have tried to use ActiveButton with same method and it works fine in that case. New values are selected from active row and inserted into object.
    JSF:
    <af:table var="row" rowSelection="single" columnSelection="single"
    value="#{ManageWO.material}" binding="#{ManageWO.materialTable}">
    <af:column sortable="false" headerText="E-number">
    <af:inputText value="#{row.enumb}" valueChangeListener="#{ManageWO.SaveMaterial}" autoSubmit="true"/>
    </af:column>
    <af:column sortable="false" headerText="Description">
    <af:inputText value="#{row.desc}" valueChangeListener="#{ManageWO.SaveMaterial}" autoSubmit="true"/>
    </af:column>
    </af:table>
    <af:activeCommandToolbarButton text="Save" action="#{ManageWO.EditData}"/>
    What is a correct place from where save method should be called to get new (edited) values from ADF table?
    Thanks.

    Did you look into the valueChangeEvent?
    It has oldValue and newValue attributes.
    public void SaveMaterial(ValueChangeEvent valueChangeEvent) {
    Object oldVal = valueChangeEvent.getOldValue();
    Object newVal = valueChangeEvent.getNewValue();
    // check if you see what you are looking for.....
    getSelectedRow();
    SaveMaterial(material);
    }Timo

Maybe you are looking for

  • Miro line item not generated

    Dear All, I have facing one issue at the time posting in MIRO. I post one of migo doc in date 03/01/2010 , the entry is:( with same material ) Post key   description  amt                               curr.( USD) 89              Stk.RM -IMP          

  • Is there a way to transfer movies I've bought on Itunes to my apple tv?

    I bought a movie on Itunes and want to transfer it to my apple tv. I know that I can watch the movie if I have iTunes open on my computer. I am wanting to transfer the movie to appletv so I don't have to have my computer on while I'm watching the mov

  • Roundtrip to earlier version of Motion

    I bought the latest version of Motion, but I'm still using Final Cut Pro 6, so when I try to create a Motion effect within FC, it attempts to open it in Motion 5, which causes a crash. This happens with any new effect, not files created by Motion 5,

  • Cannot Stop Job

    Hi, I'm running a SQL 2005 SP 2 on Windows 2003 Server R2. I have a Job that includes a IS Package and then conducts a lot of calculations of which one runs into an infinite loop. The problem now is, that I can't stop the job. If i try it sp_stop_job

  • New ICloud Mail Box hard to read on Mac

    I find that the new ICloud Mail Box is very hard for me to read, It's way to light... Is there anyway to change the background or fonts?