Multiple table commit in one transaction

Hi ,
I have a issue with JDBC. I have about 5 tables to update which are related. So i am updating them as one set with multiple tables.
what i want is to commit to database once the first three tables are updated and then move on to the next 2 tables.
Is this possible
Regards
Nikhil

hi
the xml looks like below
<root>
<stmt1>
<table1 action = "update_insert">
    <table> AAA</table>
     <access>
     </access>
     <key>
     </key>
     </table1>
<table2 action = "update_insert">
    <table> BBB</table>
     <access>
     </access>
     <key>
     </key>
     </table2>
</stmt1>
I have to use some thing like this because to mentain it as one transaction so that if one table update fails the whole transaction is roled back.
If you have any idea please do let me know
Regards
Nikhil

Similar Messages

  • Passing Multiple table row from one view to another view

    Hi,
    How to Passing Multiple table row from one view to another view in Web Dynpro Abap. (Table UI Element)
    thanx....

    Hi Ganesh,
    Kindly do search before posting.. this discussed many times..
    First create your context in component controller, and do context mapping in two views so that you can get values from
    one veiw to any views.
    and for multiple selection, for table we have property selection mode.. set as multi and remember context node selection
    selection cardinality shoud be 0-n.
    so, select n no of rows and based on some action call sec view and display data.( i think you know navigation between veiw ).
    Pelase check this...for multi selection
    Re: How to copy data from one node to another or fromone table to another table
    for navigation.. check
    navigation between the views
    Cheers,
    Kris.

  • How to use one query against multiple table and recieve one report?

    I have duplicate tables, (except for their names of course) with commodities prices. They have the same column headings, but the data is different of course. I have a query that gives me a certain piece of information I am looking for but now I need to run this query against every table. I will do this every day as well, to see if the buying criteria is met. There are alot of tables though (256). Is there a way to say run query in all tables and return the results in one place? Thanks for your help.

    hey
    a. the all 256 tables whuld be one big partitoned table
    b. you can use all_tables in order to write a select that will write the report for you:
    SQL> set head off
    SQL> select 'select * from (' from dual
      2  union all
      3  select 'select count(*) from ' || table_name || ' union all ' from a
      4  where table_name like 'DB%' AND ROWNUM <= 3
      5  union all
      6  select ')' from dual;
    select * from (
    select count(*) from DBMS_LOCK_ALLOCATED union all
    select count(*) from DBMS_ALERT_INFO union all
    select count(*) from DBMS_UPG_LOG$ union all
    remove the last 'union all', and tun the generated quary -
    SQL> set head on
    SQL> select * from (
      2  select count(*) from DBMS_LOCK_ALLOCATED union all
      3  select count(*) from DBMS_ALERT_INFO union all
      4  select count(*) from DBMS_UPG_LOG$
      5  );
      COUNT(*)
             0
             0
             0
    Amiel

  • Regarding Adding multiple SAP Scripts in one Transaction

    Hi All,
    I have a requirement where i will have to develop one custom transaction which will have multiple SAP Script Forms to it.
    The scenario is as below:
    First i will have to create a Program with Selection-Screen with 10 Radio buttons in one Block - Here Each Radio Button indicated Diffrent FORM[SAP SCRIPT].
    Down to it i will create another Block with some selection-screen fields. Like Order Type, Order No, Customer PO number, SOLD TO, BILL TO, SHIP TO etc.
    And based on Radio button selected allowed order types will vary!
    So after selecting one Form[Radio button] and enetring other selection fields once i press execute button.
    i need to display list of Orders in ALV List output with check boxes for each record in the List Output.
    Here all the radio button Forms are related to <b>Sales Order document and Delivery document</b>
    So do we need to create new ALV List Report (or) We can use submit <b>VF31</b> transaction's program <b>[sd70av3a]</b>.
    After we are displayed with orders in the output.
    Then we should provide a functionality as such if user selects mutiple Orders/Check boxes he should be able to view multiple Orders one after other, and simultaneously generate PDF Files for Each Order Selected and attach them in Mail send them to Block of users.
    Can anybody give there sujjestions.
    Without generating spool request no's is it possible to generate PDF files for SAP SCript output!
    Is it possible to Generate & attach one/multiple PDF files to mail ID and send them to list of users!
    Can anybody give inputs.
    Thanks in advance.
    Thanks & Regards,
    Prasad.

    hi prasad,
    There is one concept called Print Work Bench(PWB) to print the multiple scripts or smartforms which r assigned to a same transaction.
    If u need the info related to PWB shoot me a test mail to [email protected]
    i will send u the same
    fot the same u can check the below link also
    http://help.sap.com/saphelp_nw04/helpdata/en/64/bf2f12ed1711d4b655006094192fe3/content.htm
    <b>Prasad i didn't get the mail from you plz check it once again</b>
    If u find it useful plz mark the points
    Regards,
    Naveen
    Message was edited by: NAVEENKUMAR GUDURI

  • How to use multiple tables in developing one Graph in Endeca Integrator

    We have the requirement where we want to show the matrix for a particular entity which is coming from two separate table, there is a join which is possible on both the tables to get the correct data. But we are not able to find how to use data from two tables. We can create the SQL query with all the joining conditions but there are many tables which are involved so performance of query will be a problem. Is there any way in Endeca where I can create two data sources using two separate queries and while showing the matrix , I can join both the tables to get the matrix .

    You have not mentioned the version of Endeca that is used for your application. Joins are recently introduced in version 2.3 and could be used for avoiding complex DEFINE analytical statements. For this to work, the data should be present in the same dgraph and a single data source in Studio should point to data from both sources.
    These may not yet be the type of SQL joins that you may expect them to be as performing complex joins is also costly in Endeca. Hope you are not expecting to join huge data sets.
    The best possible solution I could think for addressing this problem is to load denormalized data (at least for now) into Endeca and do aggregations in queries. We can denormalize data in multiple ways even using ETL tools not just SQL queries as the above comment states.

  • Is there a way to combine multiple tables/sheets into one file?

    In Excel if add more than one sheet you have tabs at the bottom that you can click on and name. Does Numbers have something similar? I searched support and even googled the question but couldn't really find an answer. I appreicate any help!!!
    Thanks!!

    More a vocabulary issue than anything else, although the underlying models are somehwat different.
    A Numbers document must have at least one Sheet, the large canvas on which other objects are placed.
    Every Sheet starts with one Table on it. You can add several tables to a Sheet. Usually hese are (relatively) small, single purpose tables, typically used to perform calculations on the contents of the main table, to hold data used by the main table, to extract data from the main table for use in a Chart, or for other purposes. As each Table is added, its icon is added to the list, under the Sheet to which it was added. Tables can be moved to a different sheet by dragging their icons in the Sheets list. umbers aoutomatically updates all formulas to fit the new location.
    Charts can be added to a Sheet by selectng the data to be graphed, then choosing the chart type from the Charts button in the Toolbar. An icon for each chart is added to the list (under its Sheet) as the chart is created.
    When you add a Sheet to a Numbers document, that Sheet's icon appears in the Sheets list to the left of the working area (where the active Sheet and its contents are displayed). Charts can be moved to a differet Sheet by dragging their icons.
    Other objects (Text boxes, graphics objects) can also be added to the Sheet. No icons appear for these.
    The list of items for each Sheet can be collapsed (by clicking the disclosure triangle beside the Sheet name), hiding the Table and Chart names, and leaving only the Sheet name and icon showing in the Sheets list.
    Only one sheet may be viewed at a time. To switch between sheets, click the icon of the Shhet to which you want to go, or click the icon of an item on that sheet to bring the sheet to the front with the clicked item on the screen.
    For more detail, and a better introduction to Numbers, I'd recommend reading at least the first four chapters of the Numbers '09 User Guide, available through the Help menu in Numbers, or from this page.
    Regards,
    Barry

  • Multiple Persistence Units AND one transaction

    Hello,
    I'm using JPA implementation for my EJB Project.
    I have 2 persistence units and I'm using them in the same method.
    I want to persist 2 object belonging each one to a different persistence unit
    The 2 persistence units are related to different databases.
    Everything is going fine and no exception is raised BUT only one object is persisted and the other one is not.
    Have anyone had a similar problem before.
    Any help will be appreciated.
    Thanks in advance.
    Edited by: ImaneA on Jan 18, 2011 9:29 AM

    @Yordan :
    First of all, thanks a lot for you answer.
    At the end, I didn't use two EJB Projects :
    1 - I used only one datasource( associated to one database ) in the persistence.xml
    2 - I created a DBLink in SQL Server
    3 - I created a synonym in the first database to get data from the second database.
    And it works
    But thanks for the answer, I may use you solution in my next project
    @Rolf :
    No, In NWA I've declared my datasources as normal datasources.
    But Plz if you have docs that talks about XDataSources plz share them and thanks in advance.
    Edited by: ImaneA on Jan 25, 2011 9:21 AM

  • Join multiple tables to create one new table with data from all the other

    CREATE TABLE NAME2012 (STOCKNAME2012 VARCHAR(255), VAL2012 FLOAT)
    INSERT INTO NAME2012 VALUES (‘Stock3’, 50)
    INSERT INTO NAME2012 VALUES (‘Stock2’, 55)
    INSERT INTO NAME2012 VALUES (‘Stock4’, 45)
    CREATE TABLE NAME2011 (STOCKNAME2011 VARCHAR(255), VAL2011 FLOAT)
    INSERT INTO NAME2011 VALUES (‘Stock1’, 56)
    INSERT INTO NAME2011 VALUES (‘Stock2’, 48)
    INSERT INTO NAME2010 VALUES (‘Stock3’, 59)
    CREATE TABLE NAME2010 (STOCKNAME2010 VARCHAR(255), VAL2010 FLOAT )
    INSERT INTO NAME2010 VALUES (‘Stock1’, 47)
    INSERT INTO NAME2010 VALUES (‘Stock2’, 46)
    I would like a new Table STOCKS populated with names of stocks from the other tables as well as values. So I get a new table STOCKS, with data as below.
    CREATE TABLE STOCKS (NAME VARCHAR(255), VALUE2012 FLOAT , VALUE2011 FLOAT, VALUE2010 FLOAT)
    End result in table STOCKS should be like:
    NAME               VALUE2010              VALUE2011             
    VALUE2012
    Stock1                 47                          
    56                            NULL
    Stock2                 46                          
    48                             50
    Stock3                NULL                         59                          
     55
    Stock4                NULL                       NULL                         
    45
    How can I write a T-SQL expression that could do this?

    Hi
    There must be StockMaster
    Try this
    CREATE TABLE NAME2012 (
    STOCKNAME2012 VARCHAR(255)
    ,VAL2012 FLOAT
    INSERT INTO NAME2012
    VALUES (
    'Stock3'
    ,50
    INSERT INTO NAME2012
    VALUES (
    'Stock2'
    ,55
    INSERT INTO NAME2012
    VALUES (
    'Stock4'
    ,45
    CREATE TABLE NAME2011 (
    STOCKNAME2011 VARCHAR(255)
    ,VAL2011 FLOAT
    INSERT INTO NAME2011
    VALUES (
    'Stock1'
    ,56
    INSERT INTO NAME2011
    VALUES (
    'Stock2'
    ,48
    CREATE TABLE NAME2010 (
    STOCKNAME2010 VARCHAR(255)
    ,VAL2010 FLOAT
    INSERT INTO NAME2010
    VALUES (
    'Stock1'
    ,47
    INSERT INTO NAME2010
    VALUES (
    'Stock2'
    ,46
    INSERT INTO NAME2010
    VALUES (
    'Stock3'
    ,59
    Create table stockMaster(STOCKNAME VARCHAR(255))
    go
    Insert into stockMaster values('Stock1')
    Insert into stockMaster values('Stock2')
    Insert into stockMaster values('Stock3')
    Insert into stockMaster values('Stock4')
    Select Distinct S.STOCKNAME , A.VAL2010 ,B.VAL2011,C.VAL2012 from  stockMaster S
    left join NAME2012  C on S.STOCKNAME = C.STOCKNAME2012
    left join NAME2011 B on s.STOCKNAME = B.STOCKNAME2011
    left join NAME2010 A on s.STOCKNAME = A.STOCKNAME2010
    go
    Drop table NAME2010
    Drop table NAME2011
    Drop table NAME2012
    Drop table stockMaster 
    Mark as Ans if you find it useful
    Shridhar J Joshi Thanks a lot

  • Search a text in a multiple tables and one table has BLOB column

    Hi,
    I couldn't find a solution/examples for below scenario in oracle text documentation or related forums.
    I need to search a text in a multiple tables,in that one table has blob column which is used to store the documnents(pdf,doc,jpg..etc) and other tables have varchar2 columns,These tables have realation each other.
    Please provide a sample examples for above scenario.
    Thanks in advance..

    Have a look at my blog entry here:
    https://blogs.oracle.com/searchtech/entry/indexing_data_from_multiple_tables
    That describes two methods of achieving what you are looking for.

  • Insert data into multiple tables

    Hi all,
    I've a requirement where i need to insert data into multiple tables using PL/SQL procedure
    Procedure should have two parameters
    1. Table Name (parameter1)
    2. Data (parameter2)
    Based on these two parameters i need to insert data into table (parameter1) using data (parameter2)
    ex:
    Procedure insert_data (p_table  IN VARCHAR2
                          ,p_data   IN -- what should be the datatype?
    IS
    l_statement VARCHAR2(2000);
    BEGIN
    -- insert data into tables
    INSERT INTO p_table
    values (....);
    END insert_data;Thanks in advance!!

    BEDE wrote:
    Amen to that!
    So, I believe a better approach would be the following...
    Suppose you have N datafiles with the same structure, and you wish to insert into the database the data from all those files.
    For that, you should have a single table, named, say incoming_file_data, which should be structured more or less like below:
    create table incoming_file_data (
    filename varchar2(250) not null -- name of the file inserted from
    ,file_time timestamp -- timestamp when the data was inserted
    ,... -- the columns of meaningful data contained in the lines of those files
    );And you will insert the data from all those files in this table, having normally one transaction for each file processed, for otherwise, when shit happens, some file may only get to be partially inserted into the table...
    Maybe one good approach would be to create dynamically an external table for the file to be loaded, and then execute dynamically insert select into the table I said, so that you will have only one insert select for one file instead of using utl_file... RTM on that.If the file structures are the same, and it's just the filename that's changing, I would have a single external table definition, and use the alter table ... location ... statement (through execute immediate) to change the filename(s) as appropriate before querying the data. Of course that's not scalable if there are multiple users intenting to use this, but generally when we talk about importing multiple files, it's a one-user/one-off/once-a-day type of scenario, so multi-user isn't a consideration.

  • Multiple tables with the possibility of multiple records in each table

    Post Author: viper
    CA Forum: .NET
    Hi
    I have been trying for a few days now to come up with a CR solution to displaying data from multiple tables.  These tables, in some cases, have more then one record that needs to be displayed.  This is basically what I am trying to do.....
    I am developing a .net web application(vb) using vs2005 and an oracle 10g backend.  There is a data entry part of the site that users will enter data related to a property.  Other users will be able to search these records and have a list of records returned based on the search criteria.  The user then can click on one of these records to view a pop up CR report containing all the data related to that one property.  The PropID is passed to the pop up page and is used in the WHERE clause of my SQL statement to bring back only one property.  This data can come from as many as 18 tables if all the fields have been entered for this property.  I have tried many different solutions to get the data from multiple tables...and have had some that were close to what I need.  The best one I have will display data from multiple tables but only one record per table.....which doesn't work in my case since some of the tables have more then one record per table.
    Is there anybody that has had success in setting up similar reports?
    Does anybody know how I could use the "Group Expert" to group by the tables in my application?  I can only figure out how to group within a single table.
    It would be great if I could group by table....then just display the record(s) in each table that had the same PropID.  I am not sure if the pdf export would show all the data in that situation but it would be worth a try.  If fact...maybe I could create a new table called MyTables and just add two colums like MyTableID and MyTableName.  Then add all the table names to MyTables that I want to see in the report and add the associated MyTableID value to each table as a new column.  I could then group by MyTableID and PropID.  Just guessing here.
    Any ideas would be appreciated.

    Post Author: quafto
    CA Forum: .NET
    Your query is not too clear so I'll do my best to answer it broadly.
    You mentioned that you have a .NET web application where your users enter data on one screen and then may retrieve it on another. If the data is written in real time to a database then you can create a standard Crystal Report by adding multiple tables. The tables should be linked together using the primary and foreign keys in order to optimize the database query and give you a speedy report. Using unlinked tables is not recommended and requires the report engine to index the tables (it is quite slow).
    You also mentioned you have a "PropID" to be used in a WHERE clause. This is a great place to use a parameter in your report. This parameter can then be used in your record selection formula inside Crystal Reports. The report engine will actually create the WHERE clause for you based on the parameter value. This is helpful because it allows you to simply concentrate on your code rather than keeping track of SQL queries.
    Now, what Crystal does not do well with is uncertainty. When you design a report with X number of tables the report engine expects X number of tables to be available at processing time. You should not surprise the print engine with more or less tables because you could end up with processing errors or incorrect data. You may need to design multiple reports for specific circumstances.
    Regarding the group expert question. I'm not sure how you would/could use the group expert to group a table? A table is a collection of fields and cannot be compared to another table without a complex algorithm. The group expert is used to group and sort records based on a field in the report. Have a look at the group expert section of the help file for more information.
    Hopefully my comments have given you a few ideas.

  • Export to Excel - Multiple Tables in a single details section

    Hi All,
    I have a set of reports where I am using a single details section to show multiple tables stacked over one another. That is, i have a table with three columns and two rows, followed by some white space and then another table with 4 columns and 1 row, followed by white space and then other tables.
    When I export it to excel, I am getting the data but the ordering is in a reverse pivoted fashion:
    Excel output:
    CR_column1_Heading    CR_Column2_Heading    CR_Column1_Data CR_Column2_Data
    Is there a way to control the sequence of fields displayed in excel while exporting?
    Thanks.
    - Atif.

    @Carl,
    It is printing like this.
    HEADER1   HEADER2    HEADER3     DATA 1     DATA 2     DATA 3
    I am getting all the columns and fields in excel, that is not a problem. However, the problem is whether i can control the order the fields are printed onto Excel.
    Like what Ben is commenting:
    HEADER1   DATA 1     HEADER2    DATA 2     HEADER3     DATA 3
    However, I dont want to reorder the fields on the canvas as the format layout is predefined.
    I tried searching through the Cystal SDK if there is a finer level of control but to no avail.
    A work around under the above constraints would be simply amazing!
    Thanks again and appreciate your response.
    Regards,
    Atif.

  • Multiple tables of contents -- any updates?

    I've searched the Pages help topic and came here look to see if I could find any help. I'm writing my dissertation in Pages, and I need to have multiple tables of content: one for the chapters, headings, sub-headings, etc., one for a list of figures, and one for a list of tables.
    I found one thread on this topic that was already closed, and it looks like multiple tables of contents was not possible at that point. Are there any new updates or workarounds that would allow this feature?
    I'd hoped to complete my entire dissertation in Pages but alas, it looks like I'll have to export it to Word and struggle with learning to to TOCs in Word. Bleah.

    Karen,
    Sorry to disappoint but you aren't going to easily achieve what you want with the current version of Pages. Hopefully a newer version will do this. You might want to experiment with NeoOffice in the meantime. It's free and IMHO a less of a struggle than Word.
    In any event, concentrate on the content of your dissertation. When you have the text, the formatting will be a breeze no matter what applications you have at your disposal by then.
    Good luck!

  • Plsql coding for multiplication table

    hai i need plsql coding for multiplication table can any one plzzzz.....

    SELECT AVBELN AFKDAT AVTWEG ASPART AWAERK AKURRF AKUNAG AKNUMV
             BPOSNR BFKIMG BNETWR BMATNR
             DBEGRU ELABOR E~MATKL
             INTO CORRESPONDING FIELDS OF TABLE ITAB
             FROM VBRK AS A INNER JOIN VBRP AS B
                  ON AVBELN EQ BVBELN
             INNER JOIN J_1IEXCHDR AS C
                  ON AVBELN EQ CRDOC
             INNER JOIN KNVV AS D
                  ON DKUNNR EQ AKUNAG  AND
                     DVKORG EQ AVKORG  AND
                     DSPART EQ ASPART  AND
                     D~BEGRU NE SPACE
             INNER JOIN MARA AS E
                  ON EMATNR EQ BMATNR
             WHERE A~FKDAT IN S_FKDAT AND
                   A~FKART EQ 'F2'    AND
                   A~VTWEG IN S_VTWEG AND
                   A~SPART IN S_SPART AND
                   A~KUNAG IN S_KUNAG AND
                   A~FKSTO NE 'X'     AND
                   B~WERKS IN S_WERKS AND
                   C~TRNTYP = 'DLFC'  AND
                   E~LABOR IN S_LABOR AND
                C~SRGRP IN ('01','02','03','31','32','33','41','42','43',
                            '81','82','83','95','55','45', '48') AND
                   B~MATNR IN S_MATNR AND
                   D~BEGRU IN S_BEGRU AND
                   E~MATKL IN S_MATKL.
    but my suggestion not to use more than 2 table in inner join it will affect in performance use for all entries instead of join.
    regards
    shiba dutta

  • Multiple insert statements within one DB transaction

    Can I use a Database control to do more than one insert in a Database control method?
    If not , will this feature become available?
    I want to
    1. set autocommit off
    2. insert master record
    3. insert child records
    4. commit

    Steve--
    Glad you got this figured out; I misunderstood what you wanted to do
    -- I thought you actually wanted to call commit(). :)
    Yes, a custom control is the way to aggregate multiple DB control
    calls that need to be treated as a unit relative to the current transaction.
    The "Workshop Internals" document sheds more light on the details of
    how / why this happens.
    http://dev2dev.bea.com/products/wlworkshop81/articles/wlw_internals.jsp
    Eddie
    Steve Hicks wrote:
    Solved (having read my course notes).
    To update different database inserts (or similar) all you have to do is encapsulate
    this in ONE Java Custom Contol Method and then call the various database inserts
    (in my case) in a Database control. The JCC method does a rollback if it exits
    with an exception
    "Steve Hicks" <[email protected]> wrote:
    Tried this but it does NOT work. Would be nice to use a database control
    for this
    since this scenario is common with master/detail tables. I got the following
    error:
    java.sql.SQLException: Cannot call Connection.commit in distributed transaction.
    Transaction Manager will commit the resource manager when the distributed
    transaction
    is committed.
    FOR CODE:
    java.sql.Connection connection = userRequestDB.getConnection();
    connection.setAutoCommit(false);
    userRequestDB.insertUserRequest(userRequestForm);
    connection.commit();
    Eddie O'Neil <[email protected]> wrote:
    Steve--
    One way to do this would be to wrap the DB control in a custom
    control (JCS) or web service. Then, you can call getConnection() on
    the
    DB control and invoke setAutoCommit(false) and commit yourself. Here's
    the DB control interface documentation:
    http://e-docs.bea.com/workshop/docs81/doc/en/workshop/java-class/com/bea/control/DatabaseControl.html?skipReload=true
    This should work, but I haven't tried it myself. :)
    Eddie
    Steve Hicks wrote:
    Can I use a Database control to do more than one insert in a Databasecontrol method?
    If not , will this feature become available?
    I want to
    1. set autocommit off
    2. insert master record
    3. insert child records
    4. commit

Maybe you are looking for

  • Error while connecting 10g developer to 11 g database (windows7 64 bit)

    pls help me.I have 11g database in my laptop and I installed oracle developer suit 10g ..everything seems normal but when I try to connect to database , I am getting tns error ora12154:TNS couldnt resolve the connect identifier.. I know this thing ab

  • How to connect to apple remote

    How do I connect my Apple Remote-USA to my Nano IPod?  I bought the remote a year ago, recently found it after misplacing it, and tried to pair it with my Nano IPod but it is not working.  The battery is working.  I tried the simple directions of hol

  • Service Maintenance option is missing in SEGW

    Hi Gurus, I have used gateway in SAPUI5 of now, now I am going to build gateway services and I installed SAP NW AS ABAP 7.02 SP11 with GW_CORE 2. When i tried first time I dont see Service maintenance and from Data Model I dont see much option like t

  • Missing "Find fonts" menu item in InDesign CS6

    I need to delete some fonts from an existing InDesign document, however, the "Find Fonts" menu is missing. I see "Create outlines" and "Change case" but nothing in between where the find fonts command is supposed to be. Thanks for any help. Richard

  • Having trouble with backslash and forward slash combinations in the address line.

    The link on the website points to downloadable files. The link contains a backslash - forwardslash combination which IE8 handles comfortably. Firefox doesn't ... it says the file is not found. Is this a bug?