XML SQL format for Prepared statements in batch mode

Hi
I want to use the batch mode in JDBC adapter for inserting huge volume of records with better performance.
so i need to execute the prepared statements in one batch.   Is the XML SQL format for prepared statements below correct ?to<root>
  <stmt>
    <Customers action="SQL_DML">
      <access> INSERT INTO Customers (CompanyName,Address,CustomerID) VALUES($NAME$,$ADDRESS$,$KEYFIELD$)
      </access>
      <key>
        <NAME>IBM</NAME>
        <ADDRESS>Street 3 </ADDRESS>
        <KEYFIELD>CO</KEYFIELD>
      </key>
      <key>
        <NAME>PWC</NAME>
        <ADDRESS>Street 4 </ADDRESS>
        <KEYFIELD>NO</KEYFIELD>
     </key>
    </Customers>
  </stmt>
</root>
Please advise

Hello Experts
Please throw some light on the above question.
Thanks in advance.

Similar Messages

  • Is XML-SQL Utility for Java run on Client Side?

    A question about the XML-SQL Utility for Java
    When a client program connect to a Oracle database (the clinet program and Oracle DB is run on two different machine. Oracle 8i is used) and use the oracle.xml.sql.query.OracleXMLQuery Class (form the XSU) to generate XML by given a SQL query. I want to know the transforation process is execute in the Clinet side or the database?
    Is there any method that i can retrieve the XML directly from the database rather then doing the transformation form the Client side?

    Set JDK_HOME to the directory where you install your JDK (Java Development Kit).
    So instance, I've install JDK1.1.8 on my
    C drive so
    set JDK_HOME=c:\jdk1.1.8;c:\jdk1.1.8\bin

  • Switzerland ESR file format for Bank statement upload

    Hi,
    I want to how the Switzerland ESR file format for bank statement upload looks like?
    Can i get the sample of the file format from anywhere?
    I just want to input this file to program RFEBCH00 to convert it into multicash file format.
    Please if anybody can help regarding this?
    Thanks,

    Hi Gordon,
    Thank you so much for your welcome and prompt reply. The localization is Chinese. But the client is using HSBC service which only provides swift MT940 format. I believe Dutch is included in the system of 2007A. Unfortunately, our system is 2007B. Is there any chance I can download the bfp file from SAP portal site or other places? Thank you very much again for your help. I am looking forward to hear from you!
    Cheers,
    Leon

  • Xml SQL Utility for java and Dr.Watson for WIN-NT

    hello everybody.
    when i am running the sample code in xml Sql utility for java documentation,
    Dr. watson for windows NT error occures.
    what may be the problem? please suggest a solution
    thanks
    dev

    Set JDK_HOME to the directory where you install your JDK (Java Development Kit).
    So instance, I've install JDK1.1.8 on my
    C drive so
    set JDK_HOME=c:\jdk1.1.8;c:\jdk1.1.8\bin

  • XML Document Format for JDBC Receiver(Between operation)

    Hello everybody,
    is there a way to use a BETWEEN operation for the key in a SELECT XML document format????????, I need to filter in the Where for different Statements in teh strcuture as BETWEEN, thanks in advance.
    Regards,
    Julio

    http://help.sap.com/saphelp_nw70/helpdata/en/2e/96fd3f2d14e869e10000000a155106/content.htm
    Not sure but Check the option of
    <key1>
         <col2 compareOperation=u201DLTu201D>val2old</col2>
         <col2 compareOperation=u201DGTu201D>val2old</col2>
    </key1>
    Thanks,
    Beena.

  • Help for prepared statement

    hi,
    I want to usefollowing sql statement by preparedstatment
    select * from tbl_PreServiceManager where (trunc(Activation_Date+30)<trunc(Sysdate) or counter > 0) and CPS<>'FDE'";{code}
    to convert it to prepared statement i did following
    {code}String query="select * from tbl_Pre where (trunc(Activation_Date+30)<trunc(Sysdate) or counter >?) and CPS<>?;"
                pstmt = conn.prepareStatement( query );
                pstmt.setInt(1,0);
                pstmt.setString(2,"FDE");
                rset = pstmt.executeQuery();
    {code}
    but how i manage activation_date with trunc function, infact activation_date field is datetime and i only want to campare date.
    Thanks                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

    EG:
    datepart (dp):
    dd ->  day         ->  1-31
    dy ->  day of year ->  1-366
    hh ->  hour        ->  0-23
    mi ->  minute      ->  0-59
    mm ->  month       ->  1-12
    qq ->  quarter     ->  1-4
    ss ->  second      ->  0-59
    ms ->  millisecond ->  0-999
    wk ->  week        ->  0-53
    dw ->  weekday     ->  1-7(Sun - Mon)
    yy ->  year        ->  1753
    SELECT DATEPART(yy,GETDATE()),
           DATEPART(mm,GETDATE()),
           DATEPART(dy,GETDATE())Output
    2008 | 07 | 28

  • Need objective sql and pl/sql question for preparing interview

    Hey buddy please help me, now I am preparing interview of sql and pl/sql where asking objective question, so I need online site for preparing interview, your suggestion would be greatly appreciated.

    Have you tried searching using one of the many Internet search engines?
    I expect that there are many kinds of sites out there that may cater to you.
    The only other recommendation I would have would be to review the documentation at http://tahiti.oracle.com. Probably the SQL Language Reference, PL/SQL Reference, Application Developer's Guide, and Concept's Guide.

  • Startup class for prepared statement cache

    Hi
    we are using weblogic 7.0 sp1 . As clearcacheparamters method is not available
    with this version ,we have written a startup class to cache the preparedstaments
    that we need ,even then these statements are not getting cached .we have observed
    the oracle trace,it is parsing the prepared statement each time we make a call.Can
    anyone clarify where iam doing wrong and suggest me a way to cache the prepared
    statements we wanted.
    my sample startup class looks like this
    Collection connections = new ArrayList();
    int conCount = 0;
    Connection con =null;
    PreparedStatement prep1=null;
    PreparedStatement prep2=null;
    PreparedStatement prep3=null;
    while(true)
    try
    con = SQLConnection.getConnection();
    connections.add(con);
    prep1 = con.prepareStatement(sql1);
    prep2 = con.prepareStatement(sql2);
    prep 3 = con.prepareStatement(sql3);
    conCount++;
    catch (SQLException e)
    System.out.println("exception SQLException "+e.getMessage());
    break;
    catch (IOException e)
    System.out.println("******StartUp Connections got ---> "+conCount);
    try
    Iterator connectionIt = connections.iterator();
    while(connectionIt.hasNext())
    con = (Connection) connectionIt.next();
    con.close();
    catch (SQLException e)
    we cant upgrade to sp3 immediately ,so please provide a solution for weblogic
    7.0 sp1.
    Thanks & Regards
    Ranga

    Hi
    we are using weblogic 7.0 sp1 . As clearcacheparamters method is not available
    with this version ,we have written a startup class to cache the preparedstaments
    that we need ,even then these statements are not getting cached .we have observed
    the oracle trace,it is parsing the prepared statement each time we make a call.Can
    anyone clarify where iam doing wrong and suggest me a way to cache the prepared
    statements we wanted.
    my sample startup class looks like this
    Collection connections = new ArrayList();
    int conCount = 0;
    Connection con =null;
    PreparedStatement prep1=null;
    PreparedStatement prep2=null;
    PreparedStatement prep3=null;
    while(true)
    try
    con = SQLConnection.getConnection();
    connections.add(con);
    prep1 = con.prepareStatement(sql1);
    prep2 = con.prepareStatement(sql2);
    prep 3 = con.prepareStatement(sql3);
    conCount++;
    catch (SQLException e)
    System.out.println("exception SQLException "+e.getMessage());
    break;
    catch (IOException e)
    System.out.println("******StartUp Connections got ---> "+conCount);
    try
    Iterator connectionIt = connections.iterator();
    while(connectionIt.hasNext())
    con = (Connection) connectionIt.next();
    con.close();
    catch (SQLException e)
    we cant upgrade to sp3 immediately ,so please provide a solution for weblogic
    7.0 sp1.
    Thanks & Regards
    Ranga

  • How to get back fields from INSERT statement in batch mode(getGeneratedKeys

    Hi,
    I wanted to insert records to database and get back some fields.
    I create prepared statement:
    preparedStatement = connection.prepareStatement(sqlQuery, columnIndexes);
    then I set parameters.
    Following code works properly:
    preparedStatement.executeUpdate();
    generatedKeys = preparedStatement.getGeneratedKeys();
    if (generatedKeys.next()) {
    doSomething();
    But when I try to do this by batch I get exception:
    Caused by: java.lang.ArrayIndexOutOfBoundsException: 22
         at oracle.jdbc.driver.T4CNumberAccessor.unmarshalOneRow(T4CNumberAccessor.java:190)
         at oracle.jdbc.driver.T4C8Oall.receive(T4C8Oall.java:612)
         at oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:216)
         at oracle.jdbc.driver.T4CPreparedStatement.executeForRows(T4CPreparedStatement.java:966)
         at oracle.jdbc.driver.OraclePreparedStatement.executeBatch(OraclePreparedStatement.java:10644)
         at org.jetel.component.DBOutputTable.runInBatchMode(DBOutputTable.java:619)
    My "batch" code:
    for(...){
    setParameters(preparedStatement);
    preparedStatement.addBatch();
    preparedStatement.executeBatch();
    Isn't it a bug?
    Can I get back fields (eg. from last insert added to batch)?
    I hope somebody can help me.
    Agata

    This code works for me but only inserting one row. More than one causes an ArrayIndexOutOfBoundsException once sendBatch is called.

  • Dynamic input fields for Doc Props in Batch Mode; Acrobat Pro 9

    I'm using Acrobat Pro 9.  I'm looking for a way for Acrobat to automatically fill/replace the Title and Subject fields of the document properties with the file name of the PDF it is processing during batch mode.  Currently I have this step set to interactive and must type the name in for each file as it is processed.  Is there a script I can use? A macro? Heck! A Hack? It would literally take weeks off of my monotonous work load as the file names are long and there are thousnds of them to be processed.
    Thanks,
    Photonogon

    If you want the file name with the path, you could add the following JavaScript:
    title = path;
    subject = path;
    If you just want the file name:
    var filename = path.split("/").pop();
    title = filename;
    subject = filename;

  • Getting SQL errors with prepared statement in JDeveloper 10.1.3.2

    I'm using oracle JDBC driver and I connect and update just fine from the SQL Worksheet in JDeveloper.
    1) When I have more than 1 placeholder in my SQL statement, the last one is dropped so I get "Invalid column index".
    2) When I add an extra one, it prepares OK but gets "ORA-01745: invalid host/bind variable name" on execution if the placeholder is inside the SQL closing paren (this situation is showed below).
    3) When an extra one is outside the SQL closing paren, I get "ORA-00933: SQL command not properly ended"
    I'm probably missing something obvious but here is the code I'm using:
    public void insertToDB(Comment inrecord) throws Exception {
    int idx = 0;
    try {
    this.initialize();
    pstmt = conn.prepareStatement(
    "INSERT INTO COMMENTS (COMMENT_ID, " +
    "LOG_BUS_PROC_CDE, TYPE_CDE, SUBTYPE_CDE, " +
    "REF_TYP_CDE, CREATE_USER, CREATE_DATE, " +
    "UPDATED_USER, UPDATED_DATE, COMMENT_TEXT) VALUES(" +
    "TO_TIMESTAMP('?','YYYY-MM-DD HH24:MI:SS.FF3'), ?, ?, " +
    "?, ?, ?, TO_DATE(?,'MM/DD/YYYY'), NULL, NULL, ? ?)");
    pstmt.setString(++idx,inrecord.getCommentID());
    pstmt.setString(++idx,inrecord.getLogBusProcCDE());
    pstmt.setString(++idx,inrecord.getTypeCDE());
    pstmt.setString(++idx,inrecord.getSubTypeCDE());
    pstmt.setString(++idx,inrecord.getRefTypCDE());
    pstmt.setString(++idx,inrecord.getCreateUser());
    pstmt.setString(++idx,inrecord.getCreateDate());
    pstmt.setString(++idx,inrecord.getCommentTXT());
    pstmt.executeUpdate();
    conn.commit();
    this.terminate();
    catch (Exception e) {
    conn.rollback();
    this.terminate();
    throw e;
    }

    Hi,
    actually you increment the index
    pstmt.setString(++idx,inrecord.getCommentID());
    which means you never have an index of 0 but always start with 1
    Frank

  • Predefined bank file format for bank statement processing?

    Hi Guys,
    Currently I am working on the bsp add-on. According to the tutorial from SAP portal, there are some predefined Bank Format Project (bfp) files. Does anyone have an idea where I can get these files? I am looking for the bfp file of MT940 SWIFT. Thank you very much! Any reply would be appreciated!
    Best Regards,
    Leon

    Hi Gordon,
    Thank you so much for your welcome and prompt reply. The localization is Chinese. But the client is using HSBC service which only provides swift MT940 format. I believe Dutch is included in the system of 2007A. Unfortunately, our system is 2007B. Is there any chance I can download the bfp file from SAP portal site or other places? Thank you very much again for your help. I am looking forward to hear from you!
    Cheers,
    Leon

  • XML file format for Captivate 5 Quiz Result Analyzer

    I need to know how the XML files and folders created by Adobe's php files are structured so I can try to duplicate the proces in Coldfusion.
    We're a Microsoft shop so there's no way I'd be able to set up a WAMP server.
    Is there documentation anywhere or would somebody be willing to post an example?
    Many thanks in advance...

    One of Adobe's Tech folks on the forum mentioned writing something like this for ColdFusion a few months back.  He never got back to me and told me when he did write it it wouldn't be supported.
    Susan Wright (Equilady)
    Remember, the mighty oak was just a nut that held its ground.
    http://www.equilady.com

  • HOW do I turn off SQL Formatting for existing objects?

    SQL Developer's formatting does not match mine and is driving me mad.
    My version is 2.1.1.64.
    I create a view, I run it in a database, I look at in in SQL Developer ...
    The SQL tab shows everything every which way.
    I have tried all the options.
    ALL I WANT is to see the code just as I ENTERED IT ...
    Instead, I get all my column names in quotes (I HATE quotes!!!!!!!)
    and it aligns things, no matter how I tell it to turn off stuff.
    I want to see ...
    create or replace view XYZ (Col1, col1, col3 ... coln) as
    select a.yadda, zeda,
    (select b.yadda_desc from somewhere where b.yadda=a.yadda) as col3,
    something_else, ... more things as col N
    from somewhere a
    where something=true;
    BUT INSTEAD I SEE THIS ...
    create or replace view "schema"."XYZ" ("Col1", "col1", "col3" ... "coln") as
    select a.yadda, zeda,
    (select b.yadda_desc
    from somewhere
    where b.yadda=a.yadda
    ) as col2, something_else,
    ... more things as Col N
    from somewhere a
    where something=true;
    and it insists on wrapping the columns and subselects and function calls in some willy-nilly way.
    I just want it to stop .... no quotes, no schema, wrap the text the way I entered it.
    How can I get it to do that?
    Please help me, please ...

    Hi
    I'm having the exact same problem with SQL Dev 2.1.64
    Don't recall this ever happening before, looked through all possible options/preferences and no luck.
    I completely agree, this default formatting really gets on your nerves specially if your source is quite large and you need to preserve the code formatting in a very structured and clear way!.Anyone found out how to prevent this? im considering rolling back to one of the not so stable previous versions.
    E.g... i compile it like this
    SELECT DISTINCT
    F.DEVICE,
    SUBSTR(F.PROD_TYPE,1,6) B_TYPE,
    F.INBOUND_BNR BNR_INBOUND,
    F.COUNTRY_OF_ORIGIN
    FROM (SELECT DISTINCT C.LOT AS LOT,
    c.inbound_bnr AS inbound_bnr,
    C.PROD_TYPE AS PROD_TYPE,
    FROM (SELECT DISTINCT
    A.TRANS_DATE AS TRANSD,
    a.lot_number AS lot,
    a.quantity_1 AS waf_qty,
    and after compiling i get this
    SELECT DISTINCT F.DEVICE DEVICE, -- ' ' DEVICE,
    SUBSTR(F.PROD_TYPE,1,6) B_TYPE,
    F.INBOUND_BNR BNR_INBOUND,
    FROM
    (SELECT DISTINCT C.LOT AS LOT,
    C.WAF_QTY AS WAF_QTY,
    c.die_qty AS die_qty,
    FROM
    (SELECT DISTINCT A.TRANS_DATE AS TRANSD,
    a.lot_number AS lot,
    a.quantity_1 AS waf_qty,
    FROM sf_movem_move a,
    (SELECT DISTINCT pred_bnr_1 AS labbnr,
    PRED_BNR_1 AS INBB,
    bnr AS outbb,
    FAC

  • Oracle XML SQL Utility for Java ..

    I installed the Oracle SQL utility. But when i give a command on client side like
    C:\>java OracleXML
    it gives an error OracleXML class not found.
    Can anybody help how to run this utility.
    Thanks
    Shrikant

    You have to make sure that the oraclexmlsql.jar is in your java CLASSPATH.
    Assume you have oraclexmlsql.jar in C:\temp
    On NT, you would do something like:
    C:\> set CLASSPATH=C:\temp\oraclexmlsql.jar;%CLASSPATH%
    C:\> java OracleXML
    and it will work.

Maybe you are looking for