JDBC usage techniques for multi insert/update operations

Hi,<br /><br />I have a scenario wherein I have the following xml format(simplified version)<br /><br /><student><br /><examHeader><br /> <examNo>EX123</examNo><br />  <examMajor>IndustrialChemistry</examMajor><br />  <studentNo>AS221</studentNo><br />  <status>submitted</status><br /></examHeader><br /><examDetails><br /> <Questionnaire><br />     <answers><br />          <answer><br />               <questionId>12</questionId><br />               <questionVersion>1</questionVersion><br />               <requestId>refnumber</requestId><br />               <response>Y</response><br />               <comment>Default</comment><br />          </answer><br />     </answers><br /></Questionnaire><br /><br /> <br />Now I need to update the header details into 1 table and the details content into multiple table for each question/answer combination.<br /><br />What would be the best way to achieve this ? interms of performance and also reusablilty wise ?<br /><br />I can think of an SQL execute component to perform this , but it would be a series of sql inserts as the tables have foreign key relationships.<br /><br />how do we extract the repeatable data and insert into database in an efficient way ?<br /><br />Any help would be greatly appreciated.

Hi Senthil
You have two options:
1. Create a counter, and a loop in your orchestration. Loop through the rows in your XML, and on each iteration, perform the SQL statement you require. This can be a bit fiddly, but does work.
2. This pattern comes up often enough to warrant us having built a component to automate it. We have a component that does this in a single step - it's called "XML2SQL". You can download it here:
http://www.avoka.com/apps/checkcookie?qpac=y&qpac_code=avokaESComponents&location=%2Fapps% 2Fqpacdownload
More info here:
http://avoka.dnsalias.com/confluence/display/Public/XML+to+SQL+DSC
Howard
http://www.avoka.com

Similar Messages

  • Oracle 11g: Oracle insert/update operation is taking more time.

    Hello All,
    In Oracle 11g (Windows 2008 32 bit environment) we are facing following issue.
    1) We are inserting/updating data on some tables (4-5 tables and we are firing query with very high rate).
    2) After sometime (say 15 days with same load) we are feeling that the Oracle operation (insert/update) is taking more time.
    Query1: How to find actually oracle is taking more time in insert/updates operation.
    Query2: How to rectify the problem.
    We are having multithread environment.
    Thanks
    With Regards
    Hemant.

    Liron Amitzi wrote:
    Hi Nicolas,
    Just a short explanation:
    If you have a table with 1 column (let's say a number). The table is empty and you have an index on the column.
    When you insert a row, the value of the column will be inserted to the index. To insert 1 value to an index with 10 values in it will be fast. It will take longer to insert 1 value to an index with 1 million values in it.
    My second example was if I take the same table and let's say I insert 10 rows and delete the previous 10 from the table. I always have 10 rows in the table so the index should be small. But this is not correct. If I insert values 1-10 and then delete 1-10 and insert 11-20, then delete 11-20 and insert 21-30 and so on, because the index is sorted, where 1-10 were stored I'll now have empty spots. Oracle will not fill them up. So the index will become larger and larger as I insert more rows (even though I delete the old ones).
    The solution here is simply revuild the index once in a while.
    Hope it is clear.
    Liron Amitzi
    Senior DBA consultant
    [www.dbsnaps.com]
    [www.orbiumsoftware.com]Hmmm, index space not reused ? Index rebuild once a while ? That was what I understood from your previous post, but nothing is less sure.
    This is a misconception of how indexes are working.
    I would suggest the reading of the following interasting doc, they are a lot of nice examples (including index space reuse) to understand, and in conclusion :
    http://richardfoote.files.wordpress.com/2007/12/index-internals-rebuilding-the-truth.pdf
    "+Index Rebuild Summary+
    +•*The vast majority of indexes do not require rebuilding*+
    +•Oracle B-tree indexes can become “unbalanced” and need to be rebuilt is a myth+
    +•*Deleted space in an index is “deadwood” and over time requires the index to be rebuilt is a myth*+
    +•If an index reaches “x” number of levels, it becomes inefficient and requires the index to be rebuilt is a myth+
    +•If an index has a poor clustering factor, the index needs to be rebuilt is a myth+
    +•To improve performance, indexes need to be regularly rebuilt is a myth+"
    Good reading,
    Nicolas.

  • What mechanism Oracle 10g use for write (Insert/ Update) and Read (Select)?

    Hi
    What mechanism Oracle 10g use for write (Insert/ Update) and Read (Select)?
    Thank you

    Aren't the answers given in PL/SQL forum sufficient enough?Well, as the first answer in that forum directed the OP to this forum you can hardly blame them for the repost.
    There is some high-level stuff in the Concepts Guide. If that is insufficient the OP will need to tell us what more details they need to know (and perhaps why).
    Cheers, APC

  • Execution time for an insert/update

    Hello!
    We are using EJB entities 3.0 and JPA configured to run on WAS and DB2. We also are using Container Managed Persistence
    We have a transactional method let's name it addA(), when executed, ultimately inserts data in 11 DB2 tables.
    In some of the 11 tables there are could be multiple rows inserted, in average, about 2 inserts.
    We are using the EntityManager.persist method to handle each entity.
    The method completes in about 11 seconds when the resources on the server (CPU,memory) are in a good state (so not overloaded).
    Is this a reasonable/decent time for the operation we are trying to do?
    If not, what would be a reasonable running time for such an operation?
    What do we need to do in order to improve the performance and decrease the execution time, other than switching to BMP and coding manual SQL inserts?

    user2617486 wrote:
    Do you have any idea how we can localize/isolate better the problem at the DB level?
    Can we programatically insert log statements to see how long it takes the processing on the WAS and how long takes the actual SQL statements execution once they hit the DB2 database?You need help from a DBA, you can't reason this problem away. You need cold hard facts from whatever tooling the database provides. Of course you could try adding log statements to see how long each database operation is taking on the Java side of things, but that only proves that it is slow, not WHY it is slow.
    The network latency can not be considered in this case since we run the test application on the same WAS where the application resides so it no networking involved.and the database runs on that machine as well? This is new information you are pulling out of your hat by the way, now all of a sudden there are two applications? And with the limited information you give I am to assume you are having performance problems from the test application and not from your "main application"? Otherwise I see no point in you making this argument.

  • Create trigger for after insert update

    i have table tt (id number (10), name varchar2(20), status varchar2(1) , stage varchar2(1))
    when i insert data in table tt
    id name status stage
    1 anil a
    then trigger fire and update same value of satge to status
    like
    1 anil a a
    pls give example

    Hi,
    please try this code:
    CREATE OR REPLACE TRIGGER <tiggername>
    AFTER INSERT OR UPDATE
    ON TT
    FOR EACH ROW
    DECLARE
    v_Status varchar2(10);
    BEGIN
    -- Insert record into audit table
    INSERT INTO orders_audit
    ( id,
    name,
    stage)
    VALUES
    ( :new.id,
    :new.name,
    :new.stage);
    select stage into v_status
    from tt where stage = new.stage
    update tt set status = v_status where id = new.id
    END;

  • Problem in update operation for duet enterprise 1.0 from SharePoint end.

    Hi Everyone, I have developed a sap netweaver duet enterprise 1.0 to send the data from sap to share point and from share point to sap. The problem is that I am able to test the data successfully from duet system in sap for all the operations  Query, Read & Update and I am getting the required output.
    But from share point end when they are hitting the data for Query, Read & Update operations the query and read operations are successful but the update operation is getting failed. I unable to trigger the break point for update operation. I have checked the log but in that i am getting BULK READ status.
    Can anyone help me out in resolving this issue.
    Thanks in advance
    Regards
    Srinu

    Hi Binson,
    I want to ristrict the crude operation (create, update etc) by giving roles in backend system. i am able to apply restriction at sharepoint end but i don't want that. i want SAP role based security.
    So i want, according to given roles in backend system user is able to do operations at sharepoint.
    Thanks & Regards
    Virender Solanki

  • Cannot perform insert/update on tabular form, because of dynamic action

    Hello all,
    I have created dynamic action which computes value from several tabular form cells.
    This functionality works nice, when I change value in associated cell then the computed value is changed by the dynamic action.
    But I am not able to insert or update the row in tabular form when the dynamic action is enabled. When I set condition to "Never", then the row is inserted or updated without any problems.
    Any guess where is the problem?
    Apex version: 4.1.1.00.23
    Jiri

    Ok, below are details related to my DA. Sorry for the poor description in previous posts.
    Triggered by: Chnage event
    Selection type: jQuery Selector
    jQuery Selector
    td[headers='SPECIESCODE'] input,td[headers='MEASURETYPE'] input,td[headers='TRUNKLOGID'] input,td[headers='LOGCLASS'] input,td[headers='LENGTH'] input,td[headers='PIECES'] input,td[headers='DIAMETER'] inputTrue Actions:
    *1.*
    //get element id which was changed by user
    var v_elementid = (jQuery(this.triggeringElement).attr('id'));
    switch(v_elementid.substr(0,3))
      case "f05":
       //assign value from triggered element to hidden field     
       $s("P210_HIDDEN_SPECIES",jQuery(this.triggeringElement).val());   
       //assign actual values also to other hidden elements     
       $s("P210_HIDDEN_MEASURE",jQuery(this.triggeringElement).parents("tr:first").find("td[headers='MEASURETYPE'] input").val());
       $s("P210_HIDDEN_TRUNKLOGID",jQuery(this.triggeringElement).parents("tr:first").find("td[headers='TRUNKLOGID'] input").val());
       $s("P210_HIDDEN_LOGCLASS",jQuery(this.triggeringElement).parents("tr:first").find("td[headers='LOGCLASS'] input").val()); 
       $s("P210_HIDDEN_LENGTH",jQuery(this.triggeringElement).parents("tr:first").find("td[headers='LENGTH'] input").val()); 
       $s("P210_HIDDEN_PIECES",jQuery(this.triggeringElement).parents("tr:first").find("td[headers='PIECES'] input").val()); 
       $s("P210_HIDDEN_DIAMETER",jQuery(this.triggeringElement).parents("tr:first").find("td[headers='DIAMETER'] input").val()); 
       break;
      case "f06":
       $s("P210_HIDDEN_MEASURE",jQuery(this.triggeringElement).val());
       //assign actual values also to other hidden elements     
       $s("P210_HIDDEN_SPECIES",jQuery(this.triggeringElement).parents("tr:first").find("td[headers='SPECIESCODE'] input").val());
       $s("P210_HIDDEN_TRUNKLOGID",jQuery(this.triggeringElement).parents("tr:first").find("td[headers='TRUNKLOGID'] input").val());
       $s("P210_HIDDEN_LOGCLASS",jQuery(this.triggeringElement).parents("tr:first").find("td[headers='LOGCLASS'] input").val()); 
       $s("P210_HIDDEN_LENGTH",jQuery(this.triggeringElement).parents("tr:first").find("td[headers='LENGTH'] input").val()); 
       $s("P210_HIDDEN_PIECES",jQuery(this.triggeringElement).parents("tr:first").find("td[headers='PIECES'] input").val()); 
       $s("P210_HIDDEN_DIAMETER",jQuery(this.triggeringElement).parents("tr:first").find("td[headers='DIAMETER'] input").val());      
       break;
      case "f07":
       $s("P210_HIDDEN_TRUNKLOGID",jQuery(this.triggeringElement).val());
       //assign actual values also to other hidden elements     
       $s("P210_HIDDEN_MEASURE",jQuery(this.triggeringElement).parents("tr:first").find("td[headers='MEASURETYPE'] input").val());
       $s("P210_HIDDEN_SPECIES",jQuery(this.triggeringElement).parents("tr:first").find("td[headers='SPECIESCODE'] input").val());
       $s("P210_HIDDEN_LOGCLASS",jQuery(this.triggeringElement).parents("tr:first").find("td[headers='LOGCLASS'] input").val()); 
       $s("P210_HIDDEN_LENGTH",jQuery(this.triggeringElement).parents("tr:first").find("td[headers='LENGTH'] input").val()); 
       $s("P210_HIDDEN_PIECES",jQuery(this.triggeringElement).parents("tr:first").find("td[headers='PIECES'] input").val()); 
       $s("P210_HIDDEN_DIAMETER",jQuery(this.triggeringElement).parents("tr:first").find("td[headers='DIAMETER'] input").val());
       break;
    }*2.*
    //get element id which was changed by user
    var v_elementid = (jQuery(this.triggeringElement).attr('id'));
    switch(v_elementid.substr(0,3))
      case "f09":
       $s("P210_HIDDEN_LOGCLASS",jQuery(this.triggeringElement).val());
       //assign actual values also to other hidden elements     
       $s("P210_HIDDEN_MEASURE",jQuery(this.triggeringElement).parents("tr:first").find("td[headers='MEASURETYPE'] input").val());
       $s("P210_HIDDEN_TRUNKLOGID",jQuery(this.triggeringElement).parents("tr:first").find("td[headers='TRUNKLOGID'] input").val());
       $s("P210_HIDDEN_SPECIES",jQuery(this.triggeringElement).parents("tr:first").find("td[headers='SPECIESCODE'] input").val());
       $s("P210_HIDDEN_LENGTH",jQuery(this.triggeringElement).parents("tr:first").find("td[headers='LENGTH'] input").val()); 
       $s("P210_HIDDEN_PIECES",jQuery(this.triggeringElement).parents("tr:first").find("td[headers='PIECES'] input").val()); 
       $s("P210_HIDDEN_DIAMETER",jQuery(this.triggeringElement).parents("tr:first").find("td[headers='DIAMETER'] input").val());      
       break;
      case "f12":
       $s("P210_HIDDEN_LENGTH",jQuery(this.triggeringElement).val());
       //assign actual values also to other hidden elements     
       $s("P210_HIDDEN_MEASURE",jQuery(this.triggeringElement).parents("tr:first").find("td[headers='MEASURETYPE'] input").val());
       $s("P210_HIDDEN_TRUNKLOGID",jQuery(this.triggeringElement).parents("tr:first").find("td[headers='TRUNKLOGID'] input").val());
       $s("P210_HIDDEN_SPECIES",jQuery(this.triggeringElement).parents("tr:first").find("td[headers='SPECIESCODE'] input").val());
       $s("P210_HIDDEN_LOGCLASS",jQuery(this.triggeringElement).parents("tr:first").find("td[headers='LOGCLASS'] input").val());
       $s("P210_HIDDEN_PIECES",jQuery(this.triggeringElement).parents("tr:first").find("td[headers='PIECES'] input").val()); 
       $s("P210_HIDDEN_DIAMETER",jQuery(this.triggeringElement).parents("tr:first").find("td[headers='DIAMETER'] input").val());
       break;
      case "f13":
       $s("P210_HIDDEN_PIECES",jQuery(this.triggeringElement).val());
       //assign actual values also to other hidden elements     
       $s("P210_HIDDEN_MEASURE",jQuery(this.triggeringElement).parents("tr:first").find("td[headers='MEASURETYPE'] input").val());
       $s("P210_HIDDEN_TRUNKLOGID",jQuery(this.triggeringElement).parents("tr:first").find("td[headers='TRUNKLOGID'] input").val());
       $s("P210_HIDDEN_SPECIES",jQuery(this.triggeringElement).parents("tr:first").find("td[headers='SPECIESCODE'] input").val());
       $s("P210_HIDDEN_LENGTH",jQuery(this.triggeringElement).parents("tr:first").find("td[headers='LENGTH'] input").val()); 
       $s("P210_HIDDEN_LOGCLASS",jQuery(this.triggeringElement).parents("tr:first").find("td[headers='LOGCLASS'] input").val());
       $s("P210_HIDDEN_DIAMETER",jQuery(this.triggeringElement).parents("tr:first").find("td[headers='DIAMETER'] input").val());  
       break;
      case "f14":
       $s("P210_HIDDEN_DIAMETER",jQuery(this.triggeringElement).val());
       //assign actual values also to other hidden elements     
       $s("P210_HIDDEN_MEASURE",jQuery(this.triggeringElement).parents("tr:first").find("td[headers='MEASURETYPE'] input").val());
       $s("P210_HIDDEN_TRUNKLOGID",jQuery(this.triggeringElement).parents("tr:first").find("td[headers='TRUNKLOGID'] input").val());
       $s("P210_HIDDEN_SPECIES",jQuery(this.triggeringElement).parents("tr:first").find("td[headers='SPECIESCODE'] input").val());
       $s("P210_HIDDEN_LENGTH",jQuery(this.triggeringElement).parents("tr:first").find("td[headers='LENGTH'] input").val()); 
       $s("P210_HIDDEN_PIECES",jQuery(this.triggeringElement).parents("tr:first").find("td[headers='PIECES'] input").val()); 
       $s("P210_HIDDEN_LOGCLASS",jQuery(this.triggeringElement).parents("tr:first").find("td[headers='LOGCLASS'] input").val());
       break;
    }*3.*
    call PL/SQL function (values from hidden fields are used as input params)
    begin
    :P210_HIDDEN_VOLUME :=  function(:P210_HIDDEN_SPECIES,:P210_HIDDEN_MEASURE,:P210_HIDDEN_TRUNKLOGID,:P210_HIDDEN_LOGCLASS,:P210_HIDDEN_LENGTH,:P210_HIDDEN_DIAMETER,:P210_HIDDEN_PIECES, :G_USERLANG);
    end;*4.*
    here I want to set computed value from hidden field to VOLUME cell in tabular form. And it seems there is some problem, because not only the corresponding VOLUME cell is changed, but also several other cells. I realized that also several cells which are hidden to user has same value as computed VOLUME field. Including ROWID and then the insert/update operations are not done.
    // find the VOLUME-Field and set it to the computed value
    jQuery(this.triggeringElement).parents("tr:first").find("td[headers='VOLUME'] input").val($v("P210_HIDDEN_VOLUME"));I hope I have provide more information and somebody will be able to he help me. maybe the problem is clear, but with my poor jQuery knowledge i am not able to find it.
    Thanks in advance!
    -Jiri
    Edited by: Jiri N. on Aug 10, 2012 3:24 AM

  • Do SQL pros write seperate stored procedures to handle Save and update operations?

    hi friends,
    Currently i'm bit confused with the industry standard of writing store procedures for save and update operations. I have sees people write separate stored procedure to handle save and update operations even they have to write complex queries. Also I have
    seen people writing one store procedure to handle both Save and Update operations even when the queries are complicated. when I asked them why they do it, they said why should waste time on writing another query to update instead write one save store procedure
    to handle all.
    In here there are SQL Pros, Gurus, what would say about this?
    what is the actual industry standard with stored procedure to perform save and update operations, do you write separate ones or do both in one?
    thanks
    I use Visual studio 2012 Ultimate and SQL server 2008 developer edition!

    >what is the actual industry standard with stored procedure to perform save and update operations
    There is no industry standard. Guideline though you want to be happy with the sp-s; same for your peers.
    As noted above the MERGE command is like a Swiss Army knife; it can perform INSERT, UPDATE & DELETE
    in one (huge) statement.
    Make sure you pick good names for the sp-s, document the parameters and comment the logic if any.
    Format the stored procedure for readability:
    http://www.sqlusa.com/sqlformat/
    Kalman Toth Database & OLAP Architect
    SELECT Query Video Tutorial 4 Hours
    New Book / Kindle: Exam 70-461 Bootcamp: Querying Microsoft SQL Server 2012

  • Detailed Software Repair Instructions using Pc Companion(Win)or Bridge for MAC. (Update 8/5/2014)

    We have an extended guide that should help you repair the system of your phone. This instructions are valid for all Android based units and for some legacy Sony Ericsson models(The list of phones that can be used with the application is displayed in Step 9 of the process). please follow the instructions carefully: Turn the phone off and disconnect it from the computer.  1. Visit this link:http://www.sonymobile.com/us/tools/pc-companion/Click on Download PC companion2.Run the software After the installation the first screen will show you the PC Companion Startup Guide which gives you a brief explanation on the main modules of PC companion (Support Zone, Xperia Transfer, Contact setup and Media Go) Keep clicking next.3.Now you will see the screen with the different modules.Select Support Zone> Click Start.  The program will download the module. Then click on start on Phone/Tablet Software update. (Here you can choose to update an accessory, go to step 14 for instructions) Note: At this point if you get an error stating that "unable to install update components" or "server is busy" Please proceed to step 13 . If you not see that error then continue with step 4.
    4. The program will show a window saying "could not find phone/Tablet” Do not Connect phone instead select Repair my phone/tablet. This will bring you to a window with a warning that says "data will be lost" (do you want to continue) Select to continue (Data in the phone will be deleted, only data in the SD card will remain. Make sure you have done all proper backups if possible)6. The program will issue a second warning stating that “data saved in the phone /tablet will be overwritten during the update of your phone”. Click on the checkmark box next to the acceptance text and select Next to continue.7. Next the computer will download the necessary files (Prepare stage, this can take several minutes depending on the speed of your connection) and then its done it will show you a list of recommendations for a successful update operation. When you are done reading this section click on the checkmark box and press Continue8. Next you will get a Battery level warning that states that your phone should have at least 80% battery. (If the issue in the phone does not permit the unit from turning on, then charge it connected to the wall charger for at least 2 hours and then comeback to this step) Then click on the checkmark and select Next9. Choose the Phone from the list then click on "next" then you will see a new section telling you how to connect the phone. (don't connect it yet) Again, at this point the phone must be off and disconnected from the PC. 10.. Connect the cable to the PC not to the phone, then while pressing and holding the indicated button (in the steps on screen an specific button will be shown for you to press on the phone) connect the cable to the phone and keep holding the indicated button until the program says "the update of your phone has started..." (in some cases a message of  "Installing drivers" will appear before the message of "the update of your phone has started..."  is shown.) 11. If you failed to follow the steps correctly the phone will turn on. If this happens disconnect the phone from the cable, turn it off and repeat from step 10). 12. If the phone is connected properly, PC Companion will proceed with the update ( It will tell you to let go of the key) then wait for the update to finish and follow instructions on screen to disconnect the unit.  End of process. ----------------------------------------------------------------------If the software fails to install:13. If "unable to install update components" 1. Close Pc companion 2. Install Java from: http://www.java.com 3. start Pc companion again and try to do the software unlock process once more. 14.Select Accessories software update. Click on start and the computer will download the necessary files (Prepare Stage) it will take several minutes. Then follow the instructions from step 8.  Note: Some computers may block the installation of the update service, if this happens use this:http://www.sonymobile.com/us/tools/update-service/ this is the Standalone update software. (Not globally available)If the Phone is unresponsive (Then do this extra step and when done proceed to redo the repair process:Press and hold the power button and the volume up button at the same time for 10 to 15 seconds. This will reset the unit)Note: This procedure does not work for the Xperia Play R800x (Verizon and other Non SIM card variants of the Xperia play that lack MTP support.  It does work for the R800a At&t's model)Bridge For Mac instructions on my post below. Valid for all Android based units and most java Sony Ericsson units. 

    Here are the basic Steps for Bridge for MAC.Download Bridge for MAC from:http://www.sonymobile.com/gb/tools/bridge-for-mac/The phone should not be connected to the MAC.
    The phone should be off.After the Download unzip the file and drag the bridge for MAC icon to the Applications folder. (install then use finder to locate icon)In the Main "No phone connected" window, on the top menu (top application menu) Select "Phone" and scroll down to "Repair phone"
    This will open the Phone Software Restore window with the 3 sections for Start, Prepare and Update.
    Click on continue bellow. Doing so will popup a window warning you about the loss of your personal info. Click on the checkmark signaling that you understand the data loss situation,
    This will take you to the Connection Procedure Screen. Follow the instructions in the screen and click on continue*.
    *One key aspect of the last step to keep holding the indicated button before and after you connect the phone to the MAC until the update starts. IF this is not done correctly then the phone won't connect to the MAC

  • Insert & Update using Writeback in a single Report

    Hi,
    Here is requirement:
    In the single report where the user has to do the Insert & update using the writeback functionality.
    below is the XMl:
    <?xml version="1.0" encoding="utf-8" ?>
    <WebMessageTables xmlns:sawm="com.siebel.analytics.web/message/v1">
    <WebMessageTable lang="en-us" system="WriteBack" table="Messages">
    <WebMessage name="SUBMITBUTTON">
    <XML>
    <writeBack connectionPool="CSDK">
    <insert>INSERT INTO HSCRTARGETLOOKUP(SLA_TYPE,TARGET_AVAILABILITY,TARGET_MTTR) VALUES ('@{c0}', @{c1}, @{c2})</insert>
    <update>UPDATE HSCRTARGETLOOKUP SET TARGET_AVAILABILITY = @{c1}, TARGET_MTTR = @{c2} WHERE SLA_TYPE = '@{c0}'</update>
    </writeBack>
    </XML>
    </WebMessage>
    </WebMessageTable>
    </WebMessageTables>
    Can you please let us know whether both insert & update will work at the same time using a single report.
    Thanks in Advance
    Siva

    Hi,
    Insert & update is working with the Single xml file:
    here it is how i have done:
    in the 1st criteria i have taken three columns and made union with the 3 dummy columns.
    in the 1st dummy column: CASE WHEN 1= 0 THEN HSCRTARGETLOOKUP.SLA_TYPE ELSE NULL END
    2nd dummy column: CAST('' AS INT)
    3rd dummy column: CAST('' AS INT)
    below is the single XML file which is working for both insert & update
    <?xml version="1.0" encoding="utf-8" ?>
    <WebMessageTables xmlns:sawm="com.siebel.analytics.web/message/v1">
    <WebMessageTable lang="en-us" system="WriteBack" table="Messages">
    <WebMessage name="STATES">
    <XML>
    <writeBack connectionPool="XXXX">
    <insert>INSERT INTO HSCRTARGETLOOKUP(SLA_TYPE,TARGET_AVAILABILITY,TARGET_MTTR) VALUES ('@{c0}', @{c1}, @{c2})</insert>
    <update></update>
    <update>UPDATE HSCRTARGETLOOKUP SET TARGET_AVAILABILITY = @{c1}, TARGET_MTTR = @{c2} WHERE SLA_TYPE = '@{c0}'</update>
    </writeBack>
    </XML>
    </WebMessage>
    </WebMessageTable>
    </WebMessageTables>
    Hope it works for you also.

  • Confirmation before insert, update or delete

    Hi,
    I want to create something like alert which before insert or update or delete ask me to do that. I mean that if i am going to insert a record, it will ask me "Are you sure you want to insert record", and provide two buttons OK and cancel. If i press cancel then it will not let me do that. I tried confirm function of javascript but even when i clicked cancel it went to insert the record. How can i achieve this functionality.
    Thanks

    YOU CAN ADD THE FOLLOWING JAVASCRIPT CODE UNDER THE "onClick" EVENT FOR THE INSERT/UPDATE/DELETE BUTTONS...
    var x=window.confirm('Do you want to proceed?');
    if (!x)
    return false;
    IT WORKS FOR ME
    I HOPE IT HELPS..
    null

  • Need user response(confirmation) before Insert, update or delete

    Hi,
    I want that before insert or update or delete etc., an alert is shown to the user and if the user click OK button then that action is performed on database otherwise not. I wrote following javascripts in a user interface template and then called this function but it did not work
    function confirm_Modification_delete ()
    if (confirm("Are you sure you want to remove this record?"))
    return true;
    else
    alert("You click Cancel")
    return false;
    in the same way i also created insert or update alerts but when i clicked cancel even then they perform the insert or update or delete. How can i correct these scripts or get this functionality.
    Thanks
    Muhammad Ejaz
    null

    YOU CAN ADD THE FOLLOWING JAVASCRIPT CODE UNDER THE "onClick" EVENT FOR THE INSERT/UPDATE/DELETE BUTTONS...
    var x=window.confirm('Do you want to proceed?');
    if (!x)
    return false;
    IT WORKS FOR ME
    I HOPE IT HELPS..
    null

  • How to create stored procedure for insert update and delete operations with input output paramters?

    I  have the follwing table is called master table contain the follwing fields,
    So here i need to create  three Stored procedures 
    1.Insert operations(1 o/p paramter,and  14 input paramters)              - uspInsert
    2.Update operations(1 o/p paramter,and  14 input paramters)          - uspUpdate
    3.Delete Operations(1 o/p paramter,and  14 input paramters)          
     - uspdelte
    The following is the table ,so using this to make the three sp's ,Here we will use Exception machanism also.
    Location 
    Client Name
    Owner 
    ConfigItemID
    ConfigItemName
    DeploymentID
    IncidentID
    Package Name
    Scope 
    Stage
    Type 
    Start Date
    End Date
    Accountable 
    Comments
    So can u pls help me out for this ,bcz i knew to stored procedure's creation.

    I  have the follwing table is called master table contain the follwing fields,
    So here i need to create  three Stored procedures 
    1.Insert operations(1 o/p paramter,and  14 input paramters)              - uspInsert
    2.Update operations(1 o/p paramter,and  14 input paramters)          - uspUpdate
    3.Delete Operations(1 o/p paramter,and  14 input paramters)            - uspdelte
    The following is the table ,so using this to make the three sp's ,Here we will use Exception machanism also.
    Location 
    Client Name
    Owner 
    ConfigItemID
    ConfigItemName
    DeploymentID
    IncidentID
    Package Name
    Scope 
    Stage
    Type 
    Start Date
    End Date
    Accountable 
    Comments
    So can u pls help me out for this ,bcz i knew to stored procedure's creation.
    Why you have to pass 14 parameters for DELETE and UPDATE? Do you have any Primary Key?  If you do NOT have primary key in your table then in case you have duplicate information, SQL will update both or delete them together. You need to provide DDL of
    you table. What are the data types of fields?
    Best Wishes, Arbi; Please vote if you find this posting was helpful or Mark it as answered.

  • Query on Correct Toplink Usage for insert/update

    Hi,
    I have a JSF based web application where-in my backing bean is having the Toplink generated enities as managed properties. i.e. the Toplink entity is being populated by the JSF value binding.
    Now when I want to insert/update this entity, what approach should be followed(keeping in mind that the entities are detached entities).
    I am using Toplink ORM v 10.1.3. I was thinking that I would have to call mergeClone for the update and registerObject for insert. But can I use mergeClone for both insert and update ?
    Also mention the performance implications of the suggested option.
    Regards,
    Ani

    1. The main concern is will it work with the telecom carriers in India?
    It will work in India. The N9 is not released in the US either, so its certainly not tuned to work with specific carriers there.
    2. Do I need it to get it unlocked if I buy it from USA?
    The N9 is not released in the US, hence you will not be able to buy a locked phone from there. So no question of unlocking it.  
    3. Will I be able to update the phone's software from India?
    I bought the phone in UK, where the N9 is not released. I was able to update the software without problems.
    4. What are the chances it will give problems as there would be no warranty/support on it when I bring it here in India.
    No idea. Depends on your luck, as with any other phone.
    5. Should I go ahead and buy Lumia 800 as it is readily available in India and its support too.
    I believe the N9 is a better phone than the Lumia 800. But if you have concerns on the support and warranty, better to be safe than sorry.
    A better bet would be to buy from Singapore, if you have someone who could send you the phone from there, or buy it in India from some dealer, who also promises some support.

  • JDBC and Hung Update Operations

    Hi,
    I am learning JDBC interface in Java with Oracle database and have noticed a strange problem when I perform simple update (i.e. insert) operation (using bind variable of PreparedStatement).
    I am currently running Oracle database version 9.2.0.1.0 on Solaris 10 with my client program running on JVM Sun 1.5 with JDBC ojdbc5_g.jar. The database instance runs on Solaris OS and the JDBC thin driver is run on either Windows or Linux in an internal LAN network (using TCP). I can connect and perform queries from my JDBC code just fine; I can also perform the usual operation from SQL*Plus on my database hosting machine as well as remotely on the machines that I run the JDBC code using SQL*Plus client.
    Now, if the JDBC code attempts to perform a modification operation AND any a user connected to the database through SQL*Plus also performs some sort of update operation on the "same" table that the JDBC code is trying to modify, then the JDBC code hangs. The two operations are being performed at various times. Just to give you a scenario in which the code does or does not become responsive:
    If I login via SQL*Plus and connect to the database but perform solely "select" statements on my designated table, and run the JDBC updating code, everything works fine. The insert is done accordingly even in the subsequent updates via JDBC as long as the SQL*Plus user performs only "select" queries.
    As soon as I perform a modification operation (i.e. delete the inserted row by the JDBC code) in SQL*Plus, any subsequent attempts to, let's say insert a row, by the JDBC code would result in an operation to hang (just to note, I can acquire the connection in this scenario but the actual execution of operation from JDBC hangs, no response) -- even if I wait half an hour and run my JDBC program, the operation hangs.
    The strange thing is, to remedy this, a user that has performed some sort of modification operation on the table via SQL*Plus has to "disconnect" from the database. As soon as the SQL*Plus user disconnects, the JDBC operation goes through and program successfully performs the update
    By the way, I am also utilizing DataSource in my code (without JNDI) to establish connections but I've tried the DriverManager in my code with the same result. One last remark is that the isolation level has been set to READ COMMITTED if that has anything to do with it (but the thing is neither of updating operations from JDBC or SQL*Plus are being done at the same time -- as I've mentioned, I even waited a few minutes between each run). Perhaps, the SQL*Plus holds a luck on the rows of the table for some reason and once the user disconnects, the JDBC program goes through shrug
    Any hint would be appreciated.

    The issue is that by default, a SQL-PLUS session operates in
    'autocommit false' mode, so when you do any sort of update,
    your SQL-PLUS session has a transaction and will hold an
    exclusive lock on anything you've updated, until you commit,
    or disconnect. The JDBC session, or any second separate
    concurrent SQL-PLUS session will also be blocked.
    Joe Weinstein at BEA Systems

Maybe you are looking for

  • Mc.9 as background job

    Hi Experts, I have to schedule the MC.9 report for Material Stock Analysis in the background. The MC.9 transaction if run in the foreground is running successfully for short period of 1 month. But if i try to run the transaction for more than 3 month

  • DVDplayBD wont play blu-ray

    Here is what I get when I try to play a blu-ray disc. The computer came with a blu-ray player so it should accept it. The image you see below starts as a TOO big for the screen to show the blu-ray disc is NOT protected. Thanks all

  • How are calories calculated?

    I've been going on five mile walks and runs and no matter how long it takes me or how fast I go, it still always tells me I've burned the same number of calories (338). I know that if I run 5 miles at 6min/mile, I'm going to burn more calories than i

  • Keyword parenthesis when using Keyword Controls

    I am learning about keywords using the Keyword Controls and Keyword Presets, but sometimes when I bring keywords to the middle column, it includes the folder name in parenthesis after each tag.  Is this something I should ignore? (It seems to only ha

  • Portal Books

    Can you please suggest some books for enterprise portal sap: For configuration For use For pdf forms etc