About "insert XMLType to DB"

My code:
XMLType xt = XMLType.createXML(dbconn,xmlstr);
String sqlstr = "insert into xml_table values (?)";
stmt = dbconn.prepareStatement(sqlstr);
stmt.setObject(1,xt);
stmt.execute();
the problems:
(i can use these code correctly by "String xt")
1.the following error!
java.sql.SQLException: Non supported character set: oracle-character-set-852
2.if the "?" is replaced by "xt"
java.sql.SQLException: ORA-01729:
thanks!

i get it.
use "jdbc:oracle:oci"

Similar Messages

  • Insert XMLTYPE data into CLOB column

    Hi,
    I am trying to insert XMLTYPE datatype column value into the CLOB datatype column.
    I get an error -
    ORA - 00932: Inconsistent datatypes: expected CLOB got -
    How do I insert xml type data into clob?
    Thanks!

    Here is my sql code:
    I have a view :
    create or replace view test_view
    (id,
    code,
    desc)
    as select
    id,
    code,
    xmlroot(xmlelement("empname", ename), version '1.0') as desc
    from employee;
    I have a table emp_details_table. The columns in the emp_details_table are
    ID number,
    CODE varchar2,
    EMP_DETAILS CLOB
    I am tring to insert the 'test_view' data into the 'emp_details_table' and I get an error cannot insert xmltype data into clob.
    insert into emp_details_table
    (ID , CODE, EMP_DETAILS)
    select
    (ID, CODE, DESC) from test_view;
    Thanks.

  • Query about inserting records in queue

    Background:
    I am about to develop a seat booking system for a cinema ... To prevent inserting a record when a person books a seat, I'll generate a set of seat records in advance, and an operator will be responsible for booking seats for customers through my application with web interface, and, as a backend process, the system will UPDATE the seat availability by changing a flag in my table field.
    Question:
    To handle the situation, I may implement a servlet in 'SingleThreadModel' to make the booking prcess behaves in a first-in first-out manner, but the performance may be decreased. Can the BC4J model help me so that I could only allow one thread for the update process (i mean the seat availability updating) with a better performance framework construction? If possible, would you please also illustrate with sample code so that i can follow?
    Thanks for any replies!

    Hi,
    I agree with you that synchronizing the servlet access is not the optimal way to solve this problem. Dealing with
    row-level consistency is a typical issue for transactional applications. BC4J solves this problem by performing
    consistency checks before performing any DML. Consider the following scenario:
    Assume optimistic locking (i.e. row-level locks are not acquired when the update is made.
    Fairly typical for web applications).
    at t0 seat 1 is available
    at t1 user1 updates seat 1 as unavailable
    at t2 user2 updates seat 1 as unavailable
    at t3 user1 commits the transaction
    at t4 user2 attempts to commit the transation
    Now what should happen? As you have indicated above the application must prevent user2 from re-booking seat 1.
    Basically, BC4J does this by performing a consistency check before posting data to the database. If the database values
    at the time of post (and lock in the optimistic case) are not equal to the original database values then BC4J will throw a
    RowInconsistentException and not allow the transaction to complete.
    So, BC4J is already performing most of the work for you. As an application developer you have the choice of how to
    handle a RowInconsistentException or an AlreadyLockedException (may occur if user1 holds a lock on seat1 when
    user2 attempts to commit). For example, you may want to refresh the page with the updated record. This would
    give your operator an opportunity to select another available seat.
    Hope this helps.
    JR

  • Error while inserting XMLType document into table

    Dear sir,
    I have created a table in oracle 9i.The description is as follows:
    Name Null? Type
    ID NUMBER
    XML_DOCUMENT SYS.XMLTYPE(XMLSchema "http:
    //localhost:8080/home/SCOTT/
    xsd/message.xsd" Element "me
    ssage") STORAGE Object-relat
    ional TYPE "MESSAGE_TYPE"
    Later I tried to insert values into this table using the following statement:
    1 insert into test1(ID,XML_DOCUMENT)
    2 VALUES
    3 (100,
    4 xmltype
    5 (
    6 bfilename('xmldir','message1.xml'),
    7 nls_charset_id('AL32UTF8')
    8 )
    9* )
    I get the following error:
    ERROR at line 4:
    ORA-06553: PLS-306: wrong number or types of arguments in call to 'XMLTYPE'.
    I have no idea of what to do now.Can someone please tell me how to proceed.
    Reference:(this is for the insert command statement)
    http://download-west.oracle.com/docs/cd/B14117_01/appdev.101/b10790/xdb04cre.htm#BABDCAFB
    Thanking you in advance,
    Sincerely,
    Sirisha.

    Yes, but bear in mind that Text searching is not truely XML aware...
    Also, a single 65M document is probably not a single docuemnt, it's probably a collection of smaller documents that have been colllected together into a single document. It may make more sense to split this into it's seperate components before loading it into the database...
    The typcical signature of document of this nature is
    <ROOT>
    <ELEMENT>
    </ELEMENT>
    <ELEMENT>
    </ELEMENT>
    <ELEMENT>
    </ELEMENT>
    </ROOT>

  • NEED ADVICE about Inserting a custom formula column in EXPANSION memberset

    Dear all:
    I am asked to create a report with TIME(col), ACCOUNT(col), PRODUCT(row), where ACCOUNT stores Beginning Inventory Amt, COS, etc.
    The problem I am having is that the user requests to have a place to show COS ratio column. COS ratio value is derived from ACCOUNT COS and ACCOUNT NETSALES of my ACCOUNT MEMBERSET.
    I tried various ways but was unable to keep the formula in EVDRE so this COS ratio column's formula goes with the rest of the expansion.
    The result I want is something like below, where NETSALES and COS are my dimension members and RATIO is Excel formula STDCOST/COS... As the report expands by different TIME hierachy (i.e. 2008.total, 2008.h2, 2008.q3), RATIO is expanded accordingly.
    Is this doable in EVDRE?
                                       2008.10                                      2008.11                                      2008.12
                    NETSALES     COS     RATIO         NETSALES  COS   RATIO          NETSALES   COS      RATIO
    PRODUCT1
    PRODUCT2
    PRODUCT3

    Sarcasm?
    You can create a hundred different evdre templates and still not know everything about evdre and its functionality keeps growing. Nothing beats experience here. Iu2019m not able/allowed to provide examples, perhaps one of your colleagues? Or another forum participant?
    1) The online help is good and the Best Practice guide is also very good. I canu2019t send the evdre guide and it is not published by SAP. You can get the BPC for Office Useru2019s Guide;
    Support Portal u2013 Release & Upgrade Info u2013 Install & Upgrade Guides u2013 SAP BPC u2013 (Select your BPC release)
    Office User Guide
    https://websmp101.sap-ag.de/instguidescpm-bpc
    Grab the BPC 7 version as well, it has some better samples.
    To fully capitalize on the fullness of evdre you also need an expert level knowledge of excel, (and I donu2019t mean lots of experience). Evdre is the combination of BPC functionality and excel working in union with each other. VBA is also important in very complex situations.
    2&3) This is one approach. One of the nice features in evdre is the ability to insert excel formulas within a data range. You may need to adjust your row/col key range to address your needs.
    There is nothing really wrong with using dimension logic. Itu2019s important to understand you will take a performance hit somewhere and you should test to determine if the performance hit is within an acceptable range. I have one client with a few hundred accounts with formulas and there application works great and the performance is not to terrible.
    Also look at the following;
    How to Maximize Advanced Formatting for BPC 5.x
    https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/70573b01-657a-2b10-a2b2-ec54bb0a9c8c
    SAP Business Planning and Consolidation 7.0 - Excel Reporting Using EVDRE
    https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/30d193bd-26e8-2a10-719c-cea716a1a418
    Best Practices for Reporting within SAP Business Planning and Consolidations 5.0
    https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/2006e603-ac28-2a10-e589-db05ca5210b7

  • Question about inserting Sysdate (SQL)

    Hi all,
    I got a question about records insert when one of the fields is sysdate.
    I have to store several records representing a log, generated by the execution of a database package.
    Inside my package I wrote an internal procedure devoted to insert a record in my log table for each processing step I wanted to trace (I call this proc each time I want to record a certain step of my package).
    My log table structure is: PREC_LOGS(log_date DATE, log_message VARCHAR2(1000)), no constraints at all.
    Database ver. 8.1.7.1.0 - Production for VMS O.S.
    The 'problem' occurs when several records have the same sysdate (DD-MM-YYYY HH24:MI:SS). In this case, if I select log_date,log_message ... order by log_date, the list of records I get respects the sort condition, but when several records have the same sysdate (DD-MM-YYYY HH24:MI:SS), it doesn't respect the order of the steps theoretically inserted by the internal proc.
    Resault
    25-07-2002 11:10:20 ........ (date changed)
    25-07-2002 11:10:22 Loading data for order nr. 82364 (step 3)
    25-07-2002 11:10:22 Verifying order nr. 82364 (step 2)
    25-07-2002 11:10:22 Procedure started for order nr. 82364 (step 1)
    25-07-2002 11:10:22 Updating conditions for order nr. 82364 (step 4)
    25-07-2002 11:10:22 Procedure accomplished for order nr. 82364 (step 6)
    25-07-2002 11:10:22 Commit changes for order nr. 82364 (step 5)
    25-07-2002 11:10:24 ........ (date changed)
    Please ask for more detail if someone is interested in replying...I realize it's not a very clear explanation of my issue.
    Thanks, Marco

    Hi
    Add a field to the table that is that uses a sequence
    PREC_LOGS(log_id NUMBER(30),log_date DATE, log_message VARCHAR2(1000))
    Create a database sequence
    The insert statement now becomes something like
    INSERT INTO PREC_LOCS(log_id, log_date, log_message)
    VALUES (sequence_name.NEXTVAL, SYSDATE, 'Some message');
    Then order by the log_id when you do your select.
    Daniel

  • A question about insert?

    if the two applications want to insert the same data into database at the same time? but I only expect one application execute successful.
    how do I prevent insert the same data into database?

    if the two applications want to insert the same data
    into database at the same time? but I only expect one
    application execute successful.
    how do I prevent insert the same data into database?This is not an advanced language topic and the language is
    barely English, but allright. Here goes;
    To prevent the insertion of equivalent data into the same
    database you should find out about your database's transaction
    mechanisme (if it has one). If it doesn't you should look
    into mutual exclusion points in your client code.
    What I mean is, that you want to examine before you insert,
    and do this inside a protected timewindow. This can be achieved
    inside your database with the use of transactions, or it can
    be achieved inside your client code (if you're the only client
    to that database and both calls live inside the same JVM)
    by synchronization.
    in pseudo code:
    static Object mutex = new Object();
    synchronized (mutex) {
      Object[] result;
      result = sqlselect("select * from table where foo=bar;");
      if (result.length == 0) {
        sqlinsert("insert into table (foo="bar");");
    }

  • Help! about insert into one table from two tables'data?

    hi,all friends!
    i have a question:
    i have two table as like this:
    table_one(id,ipaddr,col1,col2) primary key(id,ipaddr)
    table_two(id,ipaddr,col1,col3,col4) primary key(id,ipaddr)
    about table_one and table_two,it's columns may change execept id and ipaddr,
    how can i insert the data of table_one and table_two into table_three,the columns of table_three may change with the columns of table_one and table_two
    table_three may dynamic create,but it's primary key is (id,ipaddr)
    thanks!
    pls help!
    any suggestion welcome!

    insert into table_3
    (id, ipaddr, col1, col2, col3, col4)
    select t1.id, t1.ipaddr, t1.col1, t1.col2, t2.col3, t2.col4
    from table_1 t1, table_2 t2
    where t2.id = t1.id
    and t2.ipaddr = t1.ipaddr;

  • ORA-01704 inserting xmltype.

    HI.
    How can I do to make this insert works? I am getting Error SQL: ORA-01704: literal de cadena demasiado largo
    01704. 00000 -  "string literal too long"
    *Cause:    The string literal is longer than 4000 characters.
    *Action:   Use a string literal of at most 4000 characters.
               Longer values may only be entered using bind variables.
    Insert into BF_MOTORPAGOS.BF_MTP_FRA_TEMPLATEBODY (FTB_TEMPLATEBODYID,FTB_TEMPLATEREFID,FTB_TYPEFORMATID,FTB_TYPESTRUCTUREID,FTB_STRUCTUREBODY,FTB_STRUCTUREBODYXML,FTB_STATE) values ('4','2','2','7',sys.xmltype('<?xml version="1.0" encoding="ISO-8859-15"?>
    <root>
      <mapping name="estructura de encabezados" lineainicio="01" lote="05" transaccion="06" lotefin="08" lineafinal="09" nit="NitEmpresaPrincipal" identificador="NumIdCliente" fecha="fechacreacion" AGREEMENT="83" TEMPLATEREFERENCE="2" TYPEFORMAT="2"/>
      <code value="01" longitud="220" interrumpe="1">
        <item name="TipoRegistro" inicio="1" fin="2" longitud="2" type="string" requerido="1"/>
        <item name="NitEmpresaPrincipal" inicio="3" fin="12" longitud="10" type="integer" requerido="1"/>
        <item name="NitEmpresaAdicional" inicio="13" fin="22" longitud="10" type="integer" requerido="0"/>
        <item name="CodEntidadFinancieraOrigen" inicio="23" fin="25" longitud="3" type="string" requerido="0"/>
        <item name="fechacreacion" inicio="26" fin="33" longitud="8" type="date" requerido="1"/>
        <item name="horagrabacion" inicio="34" fin="37" longitud="4" type="string" requerido="1"/>
        <item name="ModificadorArchivo" inicio="38" fin="38" longitud="1" type="string" requerido="1"/>
        <item name="reservado" inicio="39" fin="220" longitud="182" type="string" requerido="0"/>
      </code>
      <code value="05" longitud="220" interrumpe="1">
        <item name="TipoRegistro" inicio="1" fin="2" longitud="2" type="string" requerido="1"/>
        <item name="CodServicio" inicio="3" fin="15" longitud="13" type="integer" requerido="1"/>
        <item name="NumLote" inicio="16" fin="19" longitud="4" type="integer" requerido="1"/>
        <item name="DescripcionServicio" inicio="20" fin="34" longitud="15" type="string" requerido="1"/>
        <item name="reservado" inicio="35" fin="220" longitud="186" type="string" requerido="0"/>
      </code>
      <code value="06" longitud="220" interrumpe="0">
        <item name="TipoRegistro" inicio="1" fin="2" longitud="2" type="string" requerido="1"/>
        <item name="RefUsuario" inicio="3" fin="50" longitud="48" type="integer" requerido="1"/>
        <item name="RefSecUsuario" inicio="51" fin="80" longitud="30" type="string" requerido="0"/>
        <item name="PeriodosFacturados" inicio="81" fin="82" longitud="2" type="integer" requerido="0"/>
        <item name="Ciclo" inicio="83" fin="85" longitud="3" type="string" requerido="0"/>
        <item name="ValorServicioPrincipal" inicio="86" fin="99" longitud="14" type="integer" requerido="1"/>
        <item name="CodServFactAd" inicio="100" fin="112" longitud="13" type="string" requerido="0"/>
        <item name="VlrServAd" inicio="113" fin="126" longitud="14" type="decimal" requerido="0"/>
        <item name="fechaven" inicio="127" fin="134" longitud="8" type="date" requerido="1"/>
        <item name="idefr" inicio="135" fin="142" longitud="8" type="integer" requerido="0"/>
        <item name="NumCtaClienteReceptor" inicio="143" fin="159" longitud="17" type="string" requerido="1"/>
        <item name="TipoCtaClienteReceptor" inicio="160" fin="161" longitud="2" type="integer" requerido="0"/>
        <item name="NumIdCliente" inicio="162" fin="171" longitud="10" type="string" requerido="0"/>
        <item name="NomClteReceptor" inicio="172" fin="193" longitud="22" type="string" requerido="0"/>
        <item name="CodEntidadFinancieraOrigen" inicio="194" fin="196" longitud="3" type="integer" requerido="0"/>
        <item name="reservado" inicio="197" fin="220" longitud="24" type="string" requerido="0"/>
      </code>
      <code value="08" longitud="220" interrumpe="1">
        <item name="TipoRegistro" inicio="1" fin="2" longitud="2" type="string" requerido="1"/>
        <item name="TotalRegLote" inicio="3" fin="11" longitud="9" type="integer" requerido="1"/>
        <item name="ValorServicioPrincipal" inicio="12" fin="29" longitud="18" type="decimal" requerido="1"/>
        <item name="ValorServicioAdicional" inicio="30" fin="47" longitud="18" type="decimal" requerido="0"/>
        <item name="NLote" inicio="48" fin="51" longitud="4" type="integer" requerido="1"/>
        <item name="reservado" inicio="52" fin="220" longitud="169" type="string" requerido="0"/>
      </code>
      <code value="09" longitud="220" interrumpe="1">
        <item name="TipoRegistro" inicio="1" fin="2" longitud="2" type="string" requerido="1"/>
        <item name="TotalRegDetalle" inicio="3" fin="11" longitud="9" type="integer" requerido="1"/>
        <item name="TotalValorServicioPrincipal" inicio="12" fin="29" longitud="18" type="decimal" requerido="1"/>
        <item name="TotalValorServicioAdicional" inicio="30" fin="47" longitud="18" type="decimal" requerido="0"/>
        <item name="reservado" inicio="48" fin="220" longitud="173" type="string" requerido="0"/>
      </code>
    </root>')
        ,sys.xmltype('<?xml version="1.0" encoding="ISO-8859-15"?>
    <root>
      <mapping name="estructura de encabezados" lineainicio="01" lote="05" transaccion="06" lotefin="08" lineafinal="09" nit="NitEmpresaPrincipal" identificador="NumIdCliente" fecha="fechacreacion" AGREEMENT="2" TEMPLATEREFERENCE="2" TYPEFORMAT="2"/>
      <code value="01" longitud="220" interrumpe="1">
        <item name="TipoRegistro" inicio="1" fin="2" longitud="2" type="string" requerido="1"/>
        <item name="NitEmpresaPrincipal" inicio="3" fin="12" longitud="10" type="integer" requerido="1"/>
        <item name="NitEmpresaAdicional" inicio="13" fin="22" longitud="10" type="integer" requerido="0"/>
        <item name="CodEntidadFinancieraOrigen" inicio="23" fin="25" longitud="3" type="string" requerido="0"/>
        <item name="fechacreacion" inicio="26" fin="33" longitud="8" type="date" requerido="1"/>
        <item name="horagrabacion" inicio="34" fin="37" longitud="4" type="string" requerido="1"/>
        <item name="ModificadorArchivo" inicio="38" fin="38" longitud="1" type="string" requerido="1"/>
        <item name="reservado" inicio="39" fin="220" longitud="182" type="string" requerido="0"/>
      </code>
      <code value="05" longitud="220" interrumpe="1">
        <item name="TipoRegistro" inicio="1" fin="2" longitud="2" type="string" requerido="1"/>
        <item name="CodServicio" inicio="3" fin="15" longitud="13" type="integer" requerido="1"/>
        <item name="NumLote" inicio="16" fin="19" longitud="4" type="integer" requerido="1"/>
        <item name="DescripcionServicio" inicio="20" fin="34" longitud="15" type="string" requerido="1"/>
        <item name="reservado" inicio="35" fin="220" longitud="186" type="string" requerido="0"/>
      </code>
      <code value="06" longitud="220" interrumpe="0">
        <item name="TipoRegistro" inicio="1" fin="2" longitud="2" type="string" requerido="1"/>
        <item name="RefUsuario" inicio="3" fin="50" longitud="48" type="integer" requerido="1"/>
        <item name="RefSecUsuario" inicio="51" fin="80" longitud="30" type="string" requerido="0"/>
        <item name="PeriodosFacturados" inicio="81" fin="82" longitud="2" type="integer" requerido="0"/>
        <item name="Ciclo" inicio="83" fin="85" longitud="3" type="string" requerido="0"/>
        <item name="ValorServicioPrincipal" inicio="86" fin="99" longitud="14" type="integer" requerido="1"/>
        <item name="CodServFactAd" inicio="100" fin="112" longitud="13" type="string" requerido="0"/>
        <item name="VlrServAd" inicio="113" fin="126" longitud="14" type="decimal" requerido="0"/>
        <item name="fechaven" inicio="127" fin="134" longitud="8" type="date" requerido="1"/>
        <item name="idefr" inicio="135" fin="142" longitud="8" type="integer" requerido="0"/>
        <item name="NumCtaClienteReceptor" inicio="143" fin="159" longitud="17" type="string" requerido="1"/>
        <item name="TipoCtaClienteReceptor" inicio="160" fin="161" longitud="2" type="integer" requerido="0"/>
        <item name="NumIdCliente" inicio="162" fin="171" longitud="10" type="string" requerido="0"/>
        <item name="NomClteReceptor" inicio="172" fin="193" longitud="22" type="string" requerido="0"/>
        <item name="CodEntidadFinancieraOrigen" inicio="194" fin="196" longitud="3" type="integer" requerido="0"/>
        <item name="reservado" inicio="197" fin="220" longitud="24" type="string" requerido="0"/>
      </code>
      <code value="08" longitud="220" interrumpe="1">
        <item name="TipoRegistro" inicio="1" fin="2" longitud="2" type="string" requerido="1"/>
        <item name="TotalRegLote" inicio="3" fin="11" longitud="9" type="integer" requerido="1"/>
        <item name="ValorServicioPrincipal" inicio="12" fin="29" longitud="18" type="decimal" requerido="1"/>
        <item name="ValorServicioAdicional" inicio="30" fin="47" longitud="18" type="decimal" requerido="0"/>
        <item name="NLote" inicio="48" fin="51" longitud="4" type="integer" requerido="1"/>
        <item name="reservado" inicio="52" fin="220" longitud="169" type="string" requerido="0"/>
      </code>
      <code value="09" longitud="220" interrumpe="1">
        <item name="TipoRegistro" inicio="1" fin="2" longitud="2" type="string" requerido="1"/>
        <item name="TotalRegDetalle" inicio="3" fin="11" longitud="9" type="integer" requerido="1"/>
        <item name="TotalValorServicioPrincipal" inicio="12" fin="29" longitud="18" type="decimal" requerido="1"/>
        <item name="TotalValorServicioAdicional" inicio="30" fin="47" longitud="18" type="decimal" requerido="0"/>
        <item name="reservado" inicio="48" fin="220" longitud="173" type="string" requerido="0"/>
      </code>
    </root>'),'1');

    You can either :
    1- enclose the INSERT statement in an anonymous PL/SQL block and use XMLType variables to pass XML content to the INSERT. You'll be able to use string literal up to 32767 bytes, it should be sufficient for this case.
    2- split the XML string into multiple CLOB chunks of max. 4000 bytes, e.g.
    xmltype(
    to_clob('<?xml version="1.0" encoding="ISO-8859-15"?>
    <root>
      <mapping name="estructura de encabezados" lineainicio="01" lote="05" transaccion="06" lotefin="08" lineafinal="09" nit="NitEmpresaPrincipal" identificador="NumIdCliente" fecha="fechacreacion" AGREEMENT="83" TEMPLATEREFERENCE="2" TYPEFORMAT="2"/>
      <code value="01" longitud="220" interrumpe="1">
        <item name="TipoRegistro" inicio="1" fin="2" longitud="2" type="string" requerido="1"/>
        <item name="NitEmpresaPrincipal" inicio="3" fin="12" longitud="10" type="integer" requerido="1"/>
        <item name="NitEmpresaAdicional" inicio="13" fin="22" longitud="10" type="integer" requerido="0"/>
        <item name="CodEntidadFinancieraOrigen" inicio="23" fin="25" longitud="3" type="string" requerido="0"/>
        <item name="fechacreacion" inicio="26" fin="33" longitud="8" type="date" requerido="1"/>
        <item name="horagrabacion" inicio="34" fin="37" longitud="4" type="string" requerido="1"/>
        <item name="ModificadorArchivo" inicio="38" fin="38" longitud="1" type="string" requerido="1"/>
        <item name="reservado" inicio="39" fin="220" longitud="182" type="string" requerido="0"/>
      </code>
      <code value="05" longitud="220" interrumpe="1">
        <item name="TipoRegistro" inicio="1" fin="2" longitud="2" type="string" requerido="1"/>
        <item name="CodServicio" inicio="3" fin="15" longitud="13" type="integer" requerido="1"/>
        <item name="NumLote" inicio="16" fin="19" longitud="4" type="integer" requerido="1"/>
        <item name="DescripcionServicio" inicio="20" fin="34" longitud="15" type="string" requerido="1"/>
        <item name="reservado" inicio="35" fin="220" longitud="186" type="string" requerido="0"/>
      </code>
      <code value="06" longitud="220" interrumpe="0">
        <item name="TipoRegistro" inicio="1" fin="2" longitud="2" type="string" requerido="1"/>
        <item name="RefUsuario" inicio="3" fin="50" longitud="48" type="integer" requerido="1"/>
        <item name="RefSecUsuario" inicio="51" fin="80" longitud="30" type="string" requerido="0"/>
        <item name="PeriodosFacturados" inicio="81" fin="82" longitud="2" type="integer" requerido="0"/>
        <item name="Ciclo" inicio="83" fin="85" longitud="3" type="string" requerido="0"/>
        <item name="ValorServicioPrincipal" inicio="86" fin="99" longitud="14" type="integer" requerido="1"/>
        <item name="CodServFactAd" inicio="100" fin="112" longitud="13" type="string" requerido="0"/>
        <item name="VlrServAd" inicio="113" fin="126" longitud="14" type="decimal" requerido="0"/>
        <item name="fechaven" inicio="127" fin="134" longitud="8" type="date" requerido="1"/>
        <item name="idefr" inicio="135" fin="142" longitud="8" type="integer" requerido="0"/>
        <item name="NumCtaClienteReceptor" inicio="143" fin="159" longitud="17" type="string" requerido="1"/>
        <item name="TipoCtaClienteReceptor" inicio="160" fin="161" longitud="2" type="integer" requerido="0"/>
        <item name="NumIdCliente" inicio="162" fin="171" longitud="10" type="string" requerido="0"/>
        <item name="NomClteReceptor" inicio="172" fin="193" longitud="22" type="string" requerido="0"/>
        <item name="CodEntidadFinancieraOrigen" inicio="194" fin="196" longitud="3" type="integer" requerido="0"/>
        <item name="reservado" inicio="197" fin="220" longitud="24" type="string" requerido="0"/>
      </code>
      <code value="08" longitud="220" interrumpe="1">
        <item name="TipoRegistro" inicio="1" fin="2" longitud="2" type="string" requerido="1"/>
        <item name="TotalRegLote" inicio="3" fin="11" longitud="9" type="integer" requerido="1"/>
        <item name="ValorServicioPrincipal" inicio="12" fin="29" longitud="18" type="decimal" requerido="1"/>
        <item name="ValorServicioAdicional" inicio="30" fin="47" longitud="18" type="decimal" requerido="0"/>
        <item name="NLote" inicio="48" fin="51" longitud="4" type="integer" requerido="1"/>
        <item name="reservado" inicio="52" fin="220" longitud="169" type="string" requerido="0"/>
      </code>') || to_clob('
      <code value="09" longitud="220" interrumpe="1">
        <item name="TipoRegistro" inicio="1" fin="2" longitud="2" type="string" requerido="1"/>
        <item name="TotalRegDetalle" inicio="3" fin="11" longitud="9" type="integer" requerido="1"/>
        <item name="TotalValorServicioPrincipal" inicio="12" fin="29" longitud="18" type="decimal" requerido="1"/>
        <item name="TotalValorServicioAdicional" inicio="30" fin="47" longitud="18" type="decimal" requerido="0"/>
        <item name="reservado" inicio="48" fin="220" longitud="173" type="string" requerido="0"/>
      </code>
    </root>')
    3- use external files :
    xmltype(bfilename('XML_DIR', 'FTB_STRUCTUREBODY.xml'), nls_charset_id('WE8ISO8859P15'))
    Option #3 would be my choice most of the time to insert large XML content.

  • Question about insert date value from xml file

    I want insert value into table from xml file. Every time I inserted value of date type into the table, I got the unpasable error message as following:
    oracle.xml.sql.OracleXMLSQLException: Exception 'java.text.ParseException:Unpars
    eable date: "2000-04-19 00:00:00.0"' encountered during processing ROW element
    Thanks for anyone that can fix my problem or give me any suggestion.
    email: [email protected]

    <BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by matmnwx:
    I want insert value into table from xml file. Every time I inserted value of date type into the table, I got the unpasable error message as following:
    oracle.xml.sql.OracleXMLSQLException: Exception 'java.text.ParseException:Unpars
    eable date: "2000-04-19 00:00:00.0"' encountered during processing ROW element
    Thanks for anyone that can fix my problem or give me any suggestion.
    email: [email protected]<HR></BLOCKQUOTE>
    Use:
    OracleXMLSave sav = new OracleXMLSave(conn,tabName);
    sav.setDateFormat(<hier the date format in the XML-File>);

  • Some problems about insert String into JTextPane

    here is the colde:
    HTMLEditorKit kit = new HTMLEditorKit();
    HTMLDocument doc =(HTMLDocument)kit.createDefaultDocument();
    String str="hello world";
    SimpleAttributeSet attr =new MutableAttributeSet();
    StyleConstants.setFontFamily(attr, "Times New Roman");
    StyleConstants.setFontSize(attr, 12);
    StyleConstants.setBold(attr, true);
    StyleConstants.setBackground(attr, UIManager.getColor("control"));
    doc.insertString(1,str,attr);
    JTextPanel panel =new JTextPanel();
    panel.setEditorKit(kit);
    panel.setDocument(doc);
    text "hello word" of document can be show correctly,i save it as a .html file then open it a strange problem occured,i can't see the word "hello world" in panel,i can't find the word "hello word" in html source code except some tags of html,who can tell me what's wrong?thanks in advanced!

    hello user457523
    I have found the reason to that error.It's because there's a trigger and ext_src_file_nm is populated by the trigger from another column ext_src_file_loc when inserting and I didn't give any value to ext_src_file_loc so ext_src_file_nm is null.
    I have disabled that trigger and now I get new errors.When I traced to a line of Jave code I got missing source file warning,and the source file is also oracle.sql.CharacterSet.java.I can not trace into the source file and then I skipped that code and then I got new errors.I want to know how to trace into the jave code and find what's the matter.
    Thank you very much.

  • About Insert Error

    insert into t1 values(a,b,c,d)
    as select e,f,g,h from scott.t2;
    ORA-01401: inserted value too large for column
    why?If t1's column larger than t2's column?

    How are t1 & t2 defined?
    Do you see the same error when you execute this query via SQL*Plus rather than via ODBC?
    Justin

  • Ole2 question about inserting document object in Word

    I thought I had it figured out but it doesn't seem to work. From a Oracle Forms 6i application, I want to insert an object(a file) in a word document as an icon.
    The vb code generated when I record the macro of inserting an object as an icon is:
    Selection.InlineShapes.AddOLEObject ClassType:="Word.Document.8", FileName _
    :="string defining the location of the file object", LinkToFile:=False _
    , DisplayAsIcon:=True, IconFileName:= _
    "C:\WINDOWS\Installer\{90110409-6000-11D3-8CFE-0050048383C9}\wordicon.exe" _
    , IconIndex:=1, IconLabel:= _
    "string defining the location of the file object"
    Using this I wrote the following code: ( I am leaving out the declaration of the ole2.obj_type and other variables)
    args := ole2.create_arglist;
    ole2.add_arg (args, 'string defining the location of the file object');
    hinlineshapes :=
    ole2.get_obj_property (hselection, 'InlineShapes');
    ole2.invoke (hinlineshapes
    ,'AddOLEObject'
    ,args
    ole2.destroy_arglist (args);
    holeformat := ole2.get_obj_property (hinlineshapes, 'OLEFormat');
    ole2.set_property (holeformat
    ,'ClassType'
    ,'Word.Document.8'
    ole2.set_property (holeformat
    ,'DisplayAsIcon'
    ,TRUE
    ole2.set_property (holeformat
    ,'IconLabel'
    ,'string defining the location of the file object'
    When I run the code I get the following message from MS Word:
    " This object was created in 'string defining the location of the file object'.
    This application is not available to open this object.
    Make sure the application is properly installed and that it has not deleted, moved or renamed."
    Can someone please help? Thanks in advance.

    Second, when it inserts the date, it makes it an "update automatically" date that updates to the current time every time I open the document
    Sure, that's because you specifically tell it to. Your script inserts a 'new field' which is analogous to Word's dynamic text objects (date, time, page number, etc.)
    Instead, what you want to do is insert an actual string of characters - sure, to you and I that string of characters might look like a date and time, but to Word it's nothing more than a series of characters.
    For that we can fall back on AppleScript's date features, specifically current date, like:
    tell application "Microsoft Word"
      tell selection
        type text text "Left message " & (current date as text)
      end tell
    end tell
    Note that current date as text returns a rather verbose form of the date. If that's too much for you there are alternate options, such as:
    short date string of (current date) & space & time string of (current date)
    which will look more like: "6/10/10 3:26:50 PM"
    But there is also a myriad of other ways (with seconds, without seconds, 12/24 hr, etc.) depending on what you want.
    Third, if possible, I would also like it to be in italics.
    I'll have to look at that one, unless someone else beats me to it.

  • Problem about inserting records ? ?

    hello ,
    i want to insert record in table abc which have 3 column
    i want to insert 2 values from xyz table and one values is from variable
    i write following query
    vMYQUERY :='INSERT INTO abc(NO, TYPE, SUB_TRAN) SELECT '||vSR_NO||',TYPE,SUB_TRAN FROM xyz ;
    EXECUTE IMMEDIATE vMYQUERY;
    is it correct ?
    pankaj

    Did it work?
    You could try the USING clause;
    SQL> create table abc(NO number, TYPE varchar2(10), SUB_TRAN varchar2(10))
    Table created.
    SQL> create table xyz(NO number, TYPE varchar2(10), SUB_TRAN varchar2(10))
    Table created.
    SQL> insert into xyz values(0,' col1', 'col2')
    PL/SQL executed.
    SQL> declare
       vmyquery varchar2(100);
       vsr_no number := 99;
    begin
       vmyquery :='INSERT INTO abc(NO, TYPE, SUB_TRAN) SELECT :1,TYPE,SUB_TRAN FROM xyz' ;
       EXECUTE IMMEDIATE vmyquery USING vsr_no;
    end;
    PL/SQL procedure successfully completed.
    SQL> select * from abc
            NO TYPE       SUB_TRAN 
            99  col1      col2     
    1 row selected.

  • About inserting color to rows in alv

    hi ,
        could any one tell me how to insert colors to rows in alv.
    regards,
    pavan.

    hi,
    try like this
    TABLES:     ekko.
    TYPE-POOLS: slis.                                 "ALV Declarations
    *Data Declaration
    TYPES: BEGIN OF t_ekko,
      ebeln TYPE ekpo-ebeln,
      ebelp TYPE ekpo-ebelp,
      statu TYPE ekpo-statu,
      aedat TYPE ekpo-aedat,
      matnr TYPE ekpo-matnr,
      menge TYPE ekpo-menge,
      meins TYPE ekpo-meins,
      netpr TYPE ekpo-netpr,
      peinh TYPE ekpo-peinh,
      line_color(4) TYPE c,     "Used to store row color attributes
    END OF t_ekko.
    DATA: it_ekko TYPE STANDARD TABLE OF t_ekko INITIAL SIZE 0,
          wa_ekko TYPE t_ekko.
    *ALV data declarations
    DATA: fieldcatalog TYPE slis_t_fieldcat_alv WITH HEADER LINE,
          gd_tab_group TYPE slis_t_sp_group_alv,
          gd_layout    TYPE slis_layout_alv,
          gd_repid     LIKE sy-repid.
    *Start-of-selection.
    START-OF-SELECTION.
      PERFORM data_retrieval.
      PERFORM build_fieldcatalog.
      PERFORM build_layout.
      PERFORM display_alv_report.
    *&      Form  BUILD_FIELDCATALOG
          Build Fieldcatalog for ALV Report
    FORM build_fieldcatalog.
      fieldcatalog-fieldname   = 'EBELN'.
      fieldcatalog-seltext_m   = 'Purchase Order'.
      fieldcatalog-col_pos     = 0.
      fieldcatalog-outputlen   = 10.
      APPEND fieldcatalog TO fieldcatalog.
      CLEAR  fieldcatalog.
      fieldcatalog-fieldname   = 'EBELP'.
      fieldcatalog-seltext_m   = 'PO Item'.
      fieldcatalog-col_pos     = 1.
      APPEND fieldcatalog TO fieldcatalog.
      CLEAR  fieldcatalog.
      fieldcatalog-fieldname   = 'STATU'.
      fieldcatalog-seltext_m   = 'Status'.
      fieldcatalog-col_pos     = 2.
      APPEND fieldcatalog TO fieldcatalog.
      CLEAR  fieldcatalog.
      fieldcatalog-fieldname   = 'AEDAT'.
      fieldcatalog-seltext_m   = 'Item change date'.
      fieldcatalog-col_pos     = 3.
      APPEND fieldcatalog TO fieldcatalog.
      CLEAR  fieldcatalog.
      fieldcatalog-fieldname   = 'MATNR'.
      fieldcatalog-seltext_m   = 'Material Number'.
      fieldcatalog-col_pos     = 4.
      APPEND fieldcatalog TO fieldcatalog.
      CLEAR  fieldcatalog.
      fieldcatalog-fieldname   = 'MENGE'.
      fieldcatalog-seltext_m   = 'PO quantity'.
      fieldcatalog-col_pos     = 5.
      APPEND fieldcatalog TO fieldcatalog.
      CLEAR  fieldcatalog.
      fieldcatalog-fieldname   = 'MEINS'.
      fieldcatalog-seltext_m   = 'Order Unit'.
      fieldcatalog-col_pos     = 6.
      APPEND fieldcatalog TO fieldcatalog.
      CLEAR  fieldcatalog.
      fieldcatalog-fieldname   = 'NETPR'.
      fieldcatalog-seltext_m   = 'Net Price'.
      fieldcatalog-col_pos     = 7.
      fieldcatalog-outputlen   = 15.
      fieldcatalog-datatype     = 'CURR'.
      APPEND fieldcatalog TO fieldcatalog.
      CLEAR  fieldcatalog.
      fieldcatalog-fieldname   = 'PEINH'.
      fieldcatalog-seltext_m   = 'Price Unit'.
      fieldcatalog-col_pos     = 8.
      APPEND fieldcatalog TO fieldcatalog.
      CLEAR  fieldcatalog.
    ENDFORM.                    " BUILD_FIELDCATALOG
    *&      Form  BUILD_LAYOUT
          Build layout for ALV grid report
    FORM build_layout.
      gd_layout-no_input          = 'X'.
      gd_layout-colwidth_optimize = 'X'.
      gd_layout-info_fieldname =      'LINE_COLOR'.
    ENDFORM.                    " BUILD_LAYOUT
    *&      Form  DISPLAY_ALV_REPORT
          Display report using ALV grid
    FORM display_alv_report.
      gd_repid = sy-repid.
      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
        EXPORTING
          i_callback_program = gd_repid
          is_layout          = gd_layout
          it_fieldcat        = fieldcatalog[]
          i_save             = 'X'
        TABLES
          t_outtab           = it_ekko
        EXCEPTIONS
          program_error      = 1
          OTHERS             = 2.
      IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    ENDFORM.                    " DISPLAY_ALV_REPORT
    *&      Form  DATA_RETRIEVAL
          Retrieve data form EKPO table and populate itab it_ekko
    FORM data_retrieval.
      DATA: ld_color(1) TYPE c.
      SELECT ebeln ebelp statu aedat matnr menge meins netpr peinh
       UP TO 10 ROWS
        FROM ekpo
        INTO TABLE it_ekko.
    *Populate field with color attributes
      LOOP AT it_ekko INTO wa_ekko.
    Populate color variable with colour properties
    Char 1 = C (This is a color property)
    Char 2 = 3 (Color codes: 1 - 7)
    Char 3 = Intensified on/off ( 1 or 0 )
    Char 4 = Inverse display on/off ( 1 or 0 )
              i.e. wa_ekko-line_color = 'C410'
        ld_color = ld_color + 1.
    Only 7 colours so need to reset color value
        IF ld_color = 8.
          ld_color = 1.
        ENDIF.
        CONCATENATE 'C' ld_color '10' INTO wa_ekko-line_color.
    wa_ekko-line_color = 'C410'.
        MODIFY it_ekko FROM wa_ekko.
      ENDLOOP.
    ENDFORM.                    " DATA_RETRIEVAL
    reward if usefull....

Maybe you are looking for

  • System.ArithmeticException by Windows.System.Display.DisplayRequest.RequestRelease()

    Could anyone shed some light on whey Windows.System.Display.DisplayRequest.RequestRelease() occasionally throws System.ArithmeticException? The error message is: Overflow or underflow in the arithmetic operation. Hong

  • Vendor return integrate with FI

    Hi friends, We process vendor return with shipping . Process is create vendor return PO>create return delivery>PGI Post goods issue hit movement type 161 and relevent GL . Right now, key user need different GL to be hit based on different eturn scena

  • Photo gallery like Béhance

    I want to create a photo gallery with Muse with the same features as Béhance. The page shall show the thumbnails only. When selected an overlay pops up showing the large photo on a grey and transparent background. Anyone knows how to do this in Muse?

  • How to Call variable value in OLEDB Command SSIS

    Hi , I am facing one issue in SSIS OLEDB Command.under OLEDB Command there is sql update query     UPDATE dbo.ArchiveBBxFbapp     SET LatestVersion = 0     WHERE BBxKey = ? dbo.ArchiveBBxFbapp is the name of the table, which I want to change by dynam

  • The server responded with "500" to operation CalDAVAccountRefreshQueueableOperation

    I get this message and it will not sync my iphone, ipad or computor... what is the deal? we try to run a business and all these compauters we purchased is really letting us down...  any comments...