DBMS_XMLSave.insertXML Fails on decimal format

DBMS_XMLSave.insertXML Fails on decimal format
The following example fails when using collections of complex elements. The error is:
java.lang.NumberFormatException: 1.0'
Example is:
create table test_parent(p_id NUMBER(18),
test_col number(10))
alter table test_parent add constraint pk1 primary key(p_id)
create table test_child(t_id NUMBER(18),
test_col number(10),
p_id NUMBER(18))
alter table test_child add constraint pk2 primary key(t_id)
alter table test_child add constraint fk1 foreign key (p_id) references test_parent(p_id)
insert into test_parent values(1,1)
insert into test_child values(1,1,1)
insert into test_child values(2,2,1)
insert into test_child values(3,3,1)
create type test_c AS OBJECT (t_id NUMBER(18),test_col NUMBER(10));
CREATE OR REPLACE TYPE test_cs AS TABLE OF test_c
CREATE OR REPLACE VIEW test_view(parent_id,parent_num,child)
AS SELECT p.P_id,
p.test_col,
CAST(MULTISET(SELECT c.t_id,
c.test_col
FROM test_child c
WHERE p.p_id = c.p_id) AS test_cs) AS child
FROM test_parent P
CREATE OR REPLACE TRIGGER test_trig INSTEAD OF INSERT ON test_view
BEGIN
DBMS_OUTPUT.PUT_LINE('Trigger proccessing');
END;
SHOW ERRORS
DECLARE
insCtx DBMS_XMLSave.ctxType;
rows number;
xmlDoc CLOB := '<ROWSET>
<ROW>
<PARENT_ID>2.0</PARENT_ID>
<PARENT_NUM>2.0</PARENT_NUM>
<CHILD>
<T_ID>1.0</T_ID>
<TEST_COL>1.0</TEST_COL>
</CHILD>
</ROW>
</ROWSET>';
BEGIN
insCtx := DBMS_XMLSave.newContext('TEST_VIEW');
rows := DBMS_XMLSave.insertXML(insCtx,xmlDoc);
DBMS_XMLSave.closeContext(insCtx);
END;
DECLARE
insCtx DBMS_XMLSave.ctxType;
rows number;
xmlDoc CLOB := '<?xml version="1.0"?>
<ROWSET>
<ROW>
<PARENT_ID>1</PARENT_ID>
<PARENT_NUM>1</PARENT_NUM>
<CHILD>
<TEST_C>
<T_ID>1.0</T_ID>
<TEST_COL>1</TEST_COL>
</TEST_C>
<TEST_C>
<T_ID>2</T_ID>
<TEST_COL>2</TEST_COL>
</TEST_C>
<TEST_C>
<T_ID>3</T_ID>
<TEST_COL>3</TEST_COL>
</TEST_C>
</CHILD>
</ROW>
</ROWSET>';
BEGIN
insCtx := DBMS_XMLSave.newContext('TEST_VIEW');
rows := DBMS_XMLSave.insertXML(insCtx,xmlDoc);
DBMS_XMLSave.closeContext(insCtx);
END;

If you have access to ON, check out document 119140.1.
Apparently it's a bug in the jdbc driver in pre-Oracle 8.1.7 databases...the workaround looks messy though.

Similar Messages

  • DBMS_XMLSave.insertXML ORA-01024 error

    DBMS_XMLSave.insertXML ORA-01024 error
    The following error is being produced when trying to use DBMS_XMLSave.insertXML. The xml datagram was produced from the view using DBMS_XMLQuery.getXML. This works fine for non object nested views.
    Does anyone know of a problem with this approach or syntax.
    Thanks
    ORA-29532: Java call terminated by uncaught Java exception:
    oracle.xml.sql.OracleXMLSQLException: 'oracle.jdbc.driver.OracleSQLException:
    ORA-01024: invalid datatype in OCI call
    ' encountered during processing ROW element 1. All prior XML row changes were
    rolled back. in the XML document.
    ORA-06512: at "SYSTEM.DBMS_XMLSAVE", line 91
    ORA-06512: at "SJS.IMRES", line 60
    ORA-06512: at "SJS.IMRES", line 99
    ORA-06512: at line 6
    *************** Insert Procedure *******************
    PROCEDURE InsertXml(xmlDoc IN clob, tableName IN VARCHAR2) IS
    insCtx DBMS_XMLSave.ctxType;
    rows number;
    BEGIN
    DBMS_OUTPUT.PUT_LINE('INsertXml - '||tableName);
    insCtx := DBMS_XMLSave.newContext(tableName);
    rows := DBMS_XMLSave.insertXML(insCtx,xmlDoc);
    dbms_output.put_line('InsertXML -'||rows);
    DBMS_XMLSave.closeContext(insCtx);
    COMMIT;
    END InsertXml;
    *************** Object view *******************
    CREATE OR REPLACE TYPE sjs.imres_error_type AS OBJECT
    ("ResponseErrorCode"     VARCHAR2(10),
    "ResponseErrorDesc"     VARCHAR2(4000))
    CREATE OR REPLACE TYPE sjs.imres_errors_type AS TABLE OF imres_error_type
    CREATE OR REPLACE VIEW sjs.imresponse
    AS SELECT ith.a_id AS "ArrestNumber",
    CAST(MULTISET(SELECT ire.errorcode,
    ire.errordesc
    FROM sjs.imresponseerrors ire
    WHERE ire.ith_id = ith.ith_id) AS imres_errors_type) AS "Errors"
    FROM sjs.imtransactionhistory ith
    *************** XML DATAGRAM *******************
    <?xml version = '1.0'?>
    <ROWSET>
    <ROW>
    <ArrestNumber>2</ArrestNumber>
    <Errors>
    <Errors_ITEM>
    <ResponseErrorCode>CODE 2</ResponseErrorCode>
    <ResponseErrorDesc>DESC 2</ResponseErrorDesc>
    </Errors_ITEM>
    <Errors_ITEM>
    <ResponseErrorCode>CODE 1</ResponseErrorCode>
    <ResponseErrorDesc>DESC 1</ResponseErrorDesc>
    </Errors_ITEM>
    </Errors>
    </ROW>
    </ROWSET>

    It seems to be related to an insert/update for the same context
    having different columns with "values" in it.
    I have 3 rows. For the AMT column the first row has 151.56,
    the second row has 100.00, the third row has .00
    The third row fails with this error :
    ERROR at line 1:
    ORA-06502: PL/SQL: numeric or value error
    ORA-06512: at "MTRSTEST.KIM_RTL_XML_PKG", line 150
    ORA-29532: Java call terminated by uncaught Java exception:
    oracle.xml.sql.OracleXMLSQLException:
    Invalid context handle specified.
    ORA-06512: at "SYS.DBMS_XMLQUERY", line 170
    ORA-06512: at "MTRSTEST.KIM_RTL_XML_PKG", line 193
    ORA-29532: Java call terminated by uncaught Java exception:
    oracle.xml.sql.OracleXMLSQLException:
    Expected 'EOF'.
    ORA-06512: at "MTRSTEST.KIM_TEST", line 197
    ORA-06512: at line 1
    If I change the third row to say 10.00, for example, it works
    fine.
    We had not been on xdk9 yet, I'm having them install xdk9 and
    we'll see if the problem persists.

  • Loading data into XMLType column using dbms_xmlsave.insertxml get ORA-29532

    The following simple test case succeeded in 9.2.0.1 but failed in 9.2.0.2.
    CREATE OR REPLACE procedure InsertXML(xmlDoc IN VARCHAR2, tableName IN VARCHAR2) is
    insCtx DBMS_XMLSave.ctxType;
    rows number;
    begin
    insCtx := DBMS_XMLSave.newContext(tableName); -- get the context handle
    rows := DBMS_XMLSave.insertXML(insCtx,xmlDoc); -- this inserts the document
    dbms_output.put_line(to_char(rows) || ' rows inserted');
    DBMS_XMLSave.closeContext(insCtx); -- this closes the handle
    end;
    CREATE TABLE XMLtable
    (column1 xmltype)
    exec insertxml('<?xml version = "1.0"?><ROWSET><ROW><COLUMN1><TEST>HELLO</TEST></COLUMN1></ROW></ROWSET>', 'XMLTABLE');

    Hi,
    For your XML file I think you just need to enclose XML elemnts in ROWSET AND ROW TAGS - so xml should look like :
    <ROWSET>
    <ROW>
    <DEPT>
    </DEPT>
    and just pass it as CLOB to dbms_xmlsave.insertXML proc.
    I hope it should work.
    I am also trying to insert XML file but with a bit complex structure having multiple nested elements.
    I am not sure how to transform the external XML file to wrap it in ROWSET/ROW using XSLT. It's mandatory to use ROWSET/ROW tags to be able to insert in oracle tables. I am facing this problem right now. I am using object views to accomplish the purpose but still needs to figure out the way to apply stylesheet to incoming XML file.
    If you come to know of any way, pls do let me know also.
    Thanks

  • Default insertion for missing elements using DBMS_XMLSave.insertXML

    Hi,
    I am trying to insert default values for some columns, without having those column names as elements in the xml document. Is it possible to do so?? This is the code I am using for now, but it inserts null values for missing elements in the xml document.
    insCtx := DBMS_XMLSave.newContext ('TABLENAME'); -- get the context
    rows := DBMS_XMLSave.insertXML (insCtx, p_xmlDoc); -- insert the doc
    DBMS_XMLSave.closeContext (insCtx); -- close the handle

    Only thing I noticed with dbms_xmlstore.insertXML, was when my xml document had "<?xml version = "1.0" ?>" at the start, it gave an error "LPX-00209: PI names starting with XML are reserved"That's probably due to the XML document not starting exactly with "&lt;", like this :
    SQL> DECLARE
      2
      3    xmldoc   clob := '
      4  <?xml version="1.0"?>
      5        <ROWSET>
      6       <ROW>
      7        <COL1>1</COL1>
      8        <COL2>TEST1</COL2>
      9       </ROW>
    10       <ROW>
    11       <COL1>2</COL1>
    12      </ROW>
    13     </ROWSET>';
    14
    15    ctx      dbms_xmlstore.ctxHandle;
    16    numrows  number;
    17
    18  BEGIN
    19
    20    ctx := dbms_xmlstore.newContext('MY_TABLE');
    21    numrows := dbms_xmlstore.insertXML(ctx, xmldoc);
    22    dbms_xmlstore.closeContext(ctx);
    23
    24  END;
    25  /
    DECLARE
    ERROR at line 1:
    ORA-31011: XML parsing failed
    ORA-19202: Error occurred in XML processing
    LPX-00209: PI names starting with XML are reserved
    ORA-06512: at "SYS.DBMS_XMLSTORE", line 78
    ORA-06512: at line 21 However, it runs OK if the prolog actually starts the character stream :
    SQL> DECLARE
      2
      3    xmldoc   clob := '<?xml version="1.0"?>
      4        <ROWSET>
      5       <ROW>
      6        <COL1>1</COL1>
      7        <COL2>TEST1</COL2>
      8       </ROW>
      9       <ROW>
    10       <COL1>2</COL1>
    11      </ROW>
    12     </ROWSET>';
    13
    14    ctx      dbms_xmlstore.ctxHandle;
    15    numrows  number;
    16
    17  BEGIN
    18
    19    ctx := dbms_xmlstore.newContext('MY_TABLE');
    20    numrows := dbms_xmlstore.insertXML(ctx, xmldoc);
    21    dbms_xmlstore.closeContext(ctx);
    22
    23  END;
    24  /
    PL/SQL procedure successfully completed.
    With the dbms_xmlsave.inserXML, [...] it wont insert the default column values.Now that's strange...
    I understand there could be differences in the parsing implementation, but in the end both processes must issue an INSERT into the target table using plain SQL, so I really wonder why default values are not applied.
    I'll try to reproduce when I have access to a Java-enabled db.

  • Working with DBMS_XMLSave.insertXML and date fields

    Hello,
    I'm experiencing problems when loading date fields into the database.
    The date '20020717' in XML uploaded in the database using date format 'YYYYMMDD'
    becomes '20260920'. Is there something that I'm missing here or is this a bug in XSU?
    Versions I'm using
    Oracle XML Parser for PLSQL 9.2.0.2.0 Production
    Oracle 8.1.7.3 Database
    Hopefully the code below makes the question clear.
    PL/SQL part in which I insert the content of XMLClob into the table drtest.
    insCtx := Dbms_Xmlsave.newContext('drtest');
    Dbms_Xmlsave.SETDATEFORMAT(insCtx, 'YYYYMMDD');
    ROWS := Dbms_Xmlsave.insertXML(insCtx,XMLClob);
    Dbms_Xmlsave.closeContext(insCtx);
    Content of XMLCLob in the code
    <ROWSET>
    <ROW num="1">
    <DESALID>0000001829</DESALID>
    <DESAPNR>000000000000203997</DESAPNR>
    <DEINCO1>CIF</DEINCO1>
    <DEDELFL/>
    <DESALDT>20020717</DESALDT>
    <DECTRMA>BE</DECTRMA>
    <DESHIPT>BE</DESHIPT>
    <DECTRDP>BE</DECTRDP>
    </ROW>
    </ROWSET>

    When using date format strings in XSU, the format is defined not with the template for the Oracle DATE character strings, but with the Java SimpleDateFormat templates. Could this be the problem?

  • Key figure Date in Decimal format

    Hi all,
       I have a key figure 0CPR_ACFR_K  (Date) which is in Decimal format.
       Data in PSA for the particular field was like this '07102008'
       but after that it is changing to 7327.98  that is in decimal format.
       But i dont want this to happen ie. it should not get converted to Decimal or
       i want to convert the decimal value again to the equivalent date.
       pls help in this.

    Hi  jean liker,
    It will get converted due to its properties. If you want to use this particular object as keyfigure, you can create a variable with processing type replacement path and use. Its better to maintain as char.
    [Replacement Path: Replacement with a Characteristic Value|http://help.sap.com/saphelp_nw04/helpdata/en/03/6ba03cc24efd1de10000000a114084/frameset.htm]
    Hope it Helps
    Srini

  • Loading the data from a packed decimal format file using a sql*loader.

    Hi ,
    In one of the project i'm working here i have to load the data into oracle table from a file using a Sql*loader but the problem is the data file is in the packed decimal format so please let me know if there is any way to do this....I search a lot regarding this ..If anybody faced such type of problem ,then let me the steps to solve this.
    Thanks in advance ,
    Narasingarao.

    declare
    f utl_file.file_type;
    s1 varchar2(200);
    s2 varchar2(200);
    s3 varchar2(200);
    c number := 0;
    begin
    f := utl_file.fopen('TRY','sample1.txt','R');
    utl_file.get_line(f,s1);
    utl_file.get_line(f,s2);
    utl_file.get_line(f,s3);
    insert into sampletable (a,b,c) values (s1,s2,s3);
    c := c + 1;
    utl_file.fclose(f);
    exception
    when NO_DATA_FOUND then
    if utl_file.is_open(f) then utl_file.fclose(f); ens if;
    dbms_output.put_line('No. of rows inserted : ' || c);
    end;SY.

  • Convert a String to Decimal Format in European format

    Hi Experts,
    I am having a string as a context type for a input field, where the user can enter the Price, I need to convert the same into European format "###.###,00", I am using this below code to convert the string to decimal format
    User will enter the input as 10 as it needs to be converted into 10,00. Also, 1000 which has to be converted as 1.000,00
    String Str1 = wdContext.currentvn_temptable.getVa_TempUnitPrice();
    Locale mylocale  = Locale.GERMAN;
    String pattern="###.###,00";                    
    NumberFormat nf = NumberFormat.getNumberInstance(mylocale);
    DecimalFormat df = (DecimalFormat)nf;
    df.applyPattern(pattern);
    String output = df.format(Str1);
    wdComponentAPI.getMessageManager().reportSuccess("Unit Price" + " " + pattern + " " + output);
    When I execute the above code, i am getting an error called "Malformed Pattern ###.###,00"
    Please let me know, how to convert a String to Quantity in European format
    Thanks & Regards,
    Palani

    Hello!
    Try to change your pattern to this one 
    Locale mylocale  = Locale.GERMAN;
    String pattern = "#,#00.00";                    
    NumberFormat nf = NumberFormat.getNumberInstance(mylocale);
    DecimalFormat df = (DecimalFormat)nf;
    df.applyPattern(pattern);
    String output = df.format(1111111.222);
    Pattern has an influence on number of digits between separators, but you have to use ',' for grouping and '.' for decimal. Character values for separators correspond to your Locale object.
    Thanks, Mikhail

  • Decimal format time value to convert into time (hr:min:sec)value in a graph

    I need to develop a graph in WAD, in BW7. In the graph the value must be showed as HR:MIN:SEC, which I cannot get it right.
    The keyfigure value  carries the duration(hr:min:sec) in decimal format.  In the query, I use this keyfigure for calculation. To get the time broadcasted for a week range. I get the total duration (say 507835.000). Now I need to convert this value back to hr:min:sec. I use the below formulas to get the hr, min, sec.
    D = 507835
    Val1 = D/3600
    Val2 = Frac(val1)
    Val3 = Val2 * 60
    Val4 = frac(Val3) * 60
    Hr = Val1 – Val2
    Min =  Val3 – frac(Val3)
    Sec =  Val4
    In another formula in the query I add Hr + Min/100 + Sec/10000 to get hr.minsec format.
    When I do an average on count of weeks,  this doesn’t round off correctly.
    I tried to also use the Data function TIME() which when the time is > 24 hrs changes the value.
    Lets say if it is 39:00:00, it shows value as 15:00:00 instead of keeping the value 39:00:00.
    When I used this value in the graph it did not show the HR:MIN:SEC values in the value axis instead  it showed 0.0, 0.1,….1.0. Bcoz of this the graph is blank.
    Can anybody help me to resolve this problem.
    Thanks alot
    Anima

    I checked SU01 and didn't see anything there to customize...
    In my workstation, control panel / regional and languages settings / tab regional Options / customize; my time format is HH:mm:ss; the HH has to be in capital letter to display the time in 24 hour...
    but this is strange anyway... are you reporting with web frontend or excel?

  • Error while using dbms_xmlsave.UpdateXML and dbms_xmlsave.insertXML

    The Record I am trying to insert/update has the following structure
    <ROWSET>
    <ROW>
    <COL1>123</COL1>
    </ROW>
    </ROWSET>
    Table structure is as below
    COL1 INT [Primary constraint]
    COL2 VARCHAR2(100) NOT NULL [but has default value of 'COL2_Default']
    Now since the XML doesn't have the entry for COL2, I am explicitly setting the columns to be updated/inserted using dbms_xmlsave.setUpdateColumn.
    I use the logic the following logic to insert/update the table
    -- set the primary key column name. This forms the where clause for update statement
    dbms_xmlsave.setkeycolumn(l_Context , 'COL1');
    -- cXML have the XML structure mentioned above
    l_rows := dbms_xmlsave.updateXML(l_Context, cXML);
    IF l_rows <= 0 THEN -- which means no rows found for update
    l_rows := dbms_xmlsave.insertXML(l_Context, cXML);
    END IF;
    Now when the excution of dbms_xmlsave.updateXML happens Java Runtime Error is thrown.
    ORA-29532: Java call terminated by uncaught Java exception: oracle.xml.sql.OracleXMLSQLException: 'java.sql.SQLException: Missing IN or OUT parameter at index:: 5' encountered during processing ROW element 0. All prior XML row changes were rolled back. in the XML document.
    The version of oracle I am using is 9.2.0.6.0.
    Please let me know if anyone has any idea on this error.

    Found maybe an applicable reference...
    On http://publib.boulder.ibm.com/infocenter/wasinfo/v4r0/index.jsp?topic=/com.ibm.support.was.doc/html/Java_2_Connectivity_(J2C)/1163246.html
    it says:
    * Application code is missing a setXXX method call somewhere.
    * There might be a problem in the Oracle JDBC driver code.
    If the latter is the problem than you should or try a different JDBC driver or (which is probably the best solution anyway) create an iTar with Oracle support via metalink.oracle.com
    Other references can also be found on the internet when using google which could be applicable. Search on keywords: "Missing IN or OUT parameter at index"
    Message was edited by:
    mgralike

  • Using dbms_xmlsave.insertXML

    Hi all,
    I am reading an XML data which has similar structure to:
    <dept>
    <name> department name </name>
    <loc> department location </loc>
    <emp>
    <fisrt> first name for first employee </first>
    <last> last name for first employee </last>
    </emp>
    <emp>
    <first> first name for second employee </first>
    <last> last name for second employee </last>
    </emp>
    </dept>
    I do not have control on the structure of the XML data as I am reading it from external source. Now I have created a table as follows:
    SQL> create type emprec as object (
    first varchar2(30),
    last varchar2(30)
    SQL> create type empreclist as table of emprec;
    SQL> create table mydept (
    name varchar2(30),
    loc varchar2(50),
    emp empreclist);
    Now when I use the dbms_xmlsave.insertXML , the columns name,loc are populated but the column emp is not populated and i I define the emp column as (emprec) type, then only the last <emp></emp> data is inserted.
    Any ideas how to read all the <emp></emp> data into the dept table ?

    Hi,
    I have been trying for a while to get a nested collection loaded. The oracle documentation is no help. But what i did in the end is this. I built the object table, inserted the nested collection manual and then ran the command line XSU (documented in the app. dev. guide xml) to save the tabledata as XML (only one record) with the -withDTD switch. This creates a XML with inline DTD. Surprise surprise when you load that document it does work, even when you add more nested rows in the document. This XML file will also show you if you build the table correctly. It seems that XSU needs the DTD to be able to load nested collections.
    If you are running windows the command line utility can be run like this
    java -cp c:\oracle\ora81\rdbms\jlib\xsu12.jar;c:\oracle\ora81\lib\xmlparserv2.jar;c:\oracle\ora81\jdbc\lib\classes12.zip OracleXML getXML -user "username/password" -withDTD "select * from yourtable" >g:\xmlfiles\output.xml
    have fun

  • DBMS_XMLSave.insertXML slow.

    Hi,
    I am using the function DBMS_XMLSave.insertXML to take a clob (XML file) off a queue, and process
    the file into a table. I am finding that inserting 10,000 records (from a single clob) is taking over 30secs.
    This is an order of magnitude out from where I expected to be. It would be nice (clean) to
    be able to order my App this way using XML documents and Advanced Queues, but if I cant get the times
    down further I will need to look at other alternatives.
    Is there a way to improve the performance of DBMS_XMLSave.insertXML?
    Thanks,
    Matt

    Lucky boy, you have DBMS_XMLSave in sys schema, I have not....
    Did you try to use dbms_xmlsave.setBatchSize ? Set about 10% of total xml size (in bytes). This should improve performace greatelly.

  • DBMS_XMLSave.insertXML

    Hi All,
    I am using DBMS_XMLSave.insertXML to read a XMl file and store it in a table.
    But the maximum record I am able to insert into the oracle table is limited around 80...
    I have tried using DBMS_XMLSave.setBatchSize but it is not helping me.
    let me know if there is any way to increase the buffer?

    Lucky boy, you have DBMS_XMLSave in sys schema, I have not....
    Did you try to use dbms_xmlsave.setBatchSize ? Set about 10% of total xml size (in bytes). This should improve performace greatelly.

  • Can't replicate data inserted using DBMS_XMLSAVE.insertXML

    Enviroment:
    OS: SLES 10 SP2
    Database Version: 11.1.0.6
    I have configured an Oracle Streams environment compose by two database. The first is the source where a local capture process should captures dml changes from some tables. If I insert some data using a classic dml insert operation the changes are replicated without problems. The problem is when the tables are populated using the DBMS_XMLSAVE.insertXML procedure. With that implementation there isn't data replication. I think DBMS_XMLSAVE.insertXML must generate redolog so the capture process should capture the changes from them but it doesn't seems to be like that.
    I need some suggestion about this matter, thank you.

    Here you are
    CREATE TABLE TEST.HABI
    ID_DATA NUMBER,
    ID_HOCU INTEGER,
    ID_HABI INTEGER,
    DESCRIPTION VARCHAR2(1000 BYTE)
    TABLESPACE USERS
    PCTUSED 0
    PCTFREE 10
    INITRANS 1
    MAXTRANS 255
    STORAGE (
    INITIAL 32M
    NEXT 80K
    MINEXTENTS 1
    MAXEXTENTS UNLIMITED
    PCTINCREASE 0
    BUFFER_POOL DEFAULT
    LOGGING
    NOCOMPRESS
    NOCACHE
    NOPARALLEL
    MONITORING;
    I'am not performe explicit commit here you are the procedure:
    FUNCTION import(p_id_data IN INTEGER,
    p_lote IN INTEGER,
    p_fecha_hotel DATE,
    p_error IN OUT NOCOPY CLOB,
    p_hab_habi IN OUT NOCOPY CLOB,
    p_hcl_clie IN OUT NOCOPY CLOB,
    p_hcl_habi IN OUT NOCOPY CLOB,
    p_hcl_hist IN OUT NOCOPY CLOB,
    p_tel_llpr IN OUT NOCOPY CLOB) Return integer
    AS
    ctx DBMS_XMLSAVE.ctxType;
    v_rows NUMBER;
    v_err_msg VARCHAR(4000);
    v_cant integer;
    BEGIN
    IF length(p_error) > (length('<?xml version = ''1.0''?><ENL_TRAN_ERROR/>') + 3) THEN
    ctx := DBMS_XMLSAVE.newContext('ENL_TRAN_ERROR');
    DBMS_XMLSAVE.setRowTag(ctx, 'ROW');
    --BEGIN
    v_rows := DBMS_XMLSAVE.insertXML(ctx, p_error);
    --EXCEPTION WHEN OTHERS THEN
    -- NULL;
    --END;
    DBMS_XMLSAVE.closeContext(ctx);
    END IF;
    IF length(p_hab_habi) > (length('<?xml version = ''1.0''?><ENL_TRAN_HAB_HABI/>') + 3) THEN
    ctx := DBMS_XMLSAVE.newContext('ENL_TRAN_HAB_HABI');
    DBMS_XMLSAVE.setRowTag(ctx, 'ROW');
    --BEGIN
    v_rows := DBMS_XMLSAVE.insertXML(ctx, p_hab_habi);
    --EXCEPTION WHEN OTHERS THEN
    -- NULL;
    --END;
    DBMS_XMLSAVE.closeContext(ctx);
    END IF;
    IF (INSTR(p_hcl_clie, '&')<>0) THEN
    p_hcl_clie := replace(p_hcl_clie, '&', '&amp;');
    END IF;
    IF length(p_hcl_clie) > (length('<?xml version = ''1.0''?><ENL_TRAN_HCL_CLIE/>') + 3) THEN
    ctx := DBMS_XMLSAVE.newContext('ENL_TRAN_HCL_CLIE');
    DBMS_XMLSAVE.setRowTag(ctx, 'ROW');
    --BEGIN
    v_rows := DBMS_XMLSAVE.insertXML(ctx, p_hcl_clie);
    --EXCEPTION WHEN OTHERS THEN
    -- NULL;
    --END;
    DBMS_XMLSAVE.closeContext(ctx);
    END IF;
    IF length(p_hcl_habi) > (length('<?xml version = ''1.0''?><ENL_TRAN_HCL_HABI/>') + 3) THEN
    ctx := DBMS_XMLSAVE.newContext('ENL_TRAN_HCL_HABI');
    DBMS_XMLSAVE.setRowTag(ctx, 'ROW');
    --BEGIN
    v_rows := DBMS_XMLSAVE.insertXML(ctx, p_hcl_habi);
    --EXCEPTION WHEN OTHERS THEN
    -- NULL;
    --END;
    DBMS_XMLSAVE.closeContext(ctx);
    END IF;
    IF length(p_hcl_hist) > (length('<?xml version = ''1.0''?><ENL_TRAN_HCL_HABI_HIST/>') + 3) THEN
    ctx := DBMS_XMLSAVE.newContext('ENL_TRAN_HCL_HABI_HIST');
    DBMS_XMLSAVE.setRowTag(ctx, 'ROW');
    --BEGIN
    v_rows := DBMS_XMLSAVE.insertXML(ctx, p_hcl_hist);
    --EXCEPTION WHEN OTHERS THEN
    -- NULL;
    --END;
    DBMS_XMLSAVE.closeContext(ctx);
    END IF;
    IF length(p_tel_llpr) > (length('<?xml version = ''1.0''?><ENL_TRAN_TEL_LLPR/>') + 3) THEN
    ctx := DBMS_XMLSAVE.newContext('ENL_TRAN_TEL_LLPR');
    DBMS_XMLSAVE.setRowTag(ctx, 'ROW');
    --BEGIN
    v_rows := DBMS_XMLSAVE.insertXML(ctx, p_tel_llpr);
    --EXCEPTION WHEN OTHERS THEN
    -- NULL;
    --END;
    DBMS_XMLSAVE.closeContext(ctx);
    END IF;
    END import;
    I hope you can help me.

  • Decimal Format and Scientific Notation

    I am trying to print numbers in scientific notation using the Decimal Format class. What follows is a simple test program I wrote to find the bug. So far, I have not found a solution.
    import java.text.*;
    public class formatted {
    public static void main (String Arguments[]) {
    DecimalFormat form = new DecimalFormat("0.###E0");
         double numb = 123456.789;
         System.out.println("Nuber is: " +
    form.format(numb));
    The output of this program is... Nuber is: 123456E
    The output is the same if numb is an int, float, or double. If I format the number as "#####.0" or "#####.00" the output is correct. I think that I am following the rules for formatting a number in scientific notation as the process is outlined in the documentation (provided below).
    ***** From Decimal Format under Scientific Notation ***
    Numbers in scientific notation are expressed as the product of a mantissa and a power of ten, for
    example, 1234 can be expressed as 1.234 x 10^3. The mantissa is often in the range 1.0 <= x < 10.0,
    but it need not be. DecimalFormat can be instructed to format and parse scientific notation only via a
    pattern; there is currently no factory method that creates a scientific notation format. In a pattern,
    the exponent character immediately followed by one or more digit characters indicates scientific
    notation. Example: "0.###E0" formats the number 1234 as "1.234E3".
    Anyone understand how the short program is incorrectly written?
    Marc

    The problem is
    format = "0.###E0"
    input number = 123456.789
    output = 123456E (not scientific notation!)
    This is not scientific notation at all. There is no decimal point given and no value in the exponent.
    I understand entirely that by adding more #'es will provide more precision. The bug I have is the output is not printed in the scientific format; other formats work.
    MArc

Maybe you are looking for

  • Lock rows and columns header in a table view report. It is possible?

    hi, I have a Dashboard that displays a report in "Table View" with many rows and columns. Is it possible to set a lock on the rows and columns like Excel? This would have blocked such headers that contain attributes and measures and to browse the rep

  • Enabling guest/anonymous user accesss using sun access manager(opensso 8.0)

    Hi, How to enable anonymous/guest user login through opensso? In otherwords, if I try to access my application protected by opnesso, the user should be not be redirected to opensso login page automatically. Instead the user can see the content which

  • How To Select Range With Multiple Tracks

    Hi, Is there a way to set an In point within a large reel, and then set an outpoint so I can then select everything within that range to copy?  The Range Selection Tool is sort of useless here, as it only selects the Video track, not the V2 (above it

  • Easy color select / change in Touch Version

    Hi all, thanks for your work on the current Touch Win8 Version for the reader. I just have three propsals for improvements: Easy color selection for highlights: Please bring an additional button into the taskbar to selct the color for the tool you se

  • Help!  Accidentally wiped out my website.

    Hi, Hope someone can help me with this. I have a .mac account and designed a beautiful website that took days to develop. I was under the impression that with .mac you could have multiple websites. So I thought I was creating an alternate site where