Insert to multiple table using single DB Adapter

Hi,
I m using Jdev 11g Build JDEVADF_11.1.1.2.0_GENERIC_091029.2229.5536
Can anyone tell me how can we do insert and update operations to mutliple tables using single DB adapter.
I want to do insert in 2 tables and update the third using same DB apater. Is it possible?If yes, how?

Hi,
You can write a PL\SQL (Stored Procedure) to do your operations and call the PL\SQL code from DB Adapter.
-Senaka

Similar Messages

  • Accessing multiple directories using single file adapter

    Hi All,
              I have data coming from two banks. I need to put them in SAP file server. Now i have two sender adapters for each bank, now is there a way i can use same receiver adapter but create diff directories to store them.
    XIer

    Hi,
    In file sender communication channel there is a check box for Advanced Selection for Source file. Check that and you dont put anything in exclusion which means it takes all the files from multiple direcotires. Please check this weblog where he has excluded some files in the directory. But you dont need to exclude anything.
    /people/mickael.huchet/blog/2006/09/18/xipi-how-to-exclude-files-in-a-sender-file-adapter
    Regards,
    ---Satish

  • Multiple networks using single network adapter

    Hi,
    If I have only single network adapter in a OVM server (or  single bond interface bond0 created from two network adapters), is it possible to separate networks for
    VM management, live migrate and VM public networks using any mechanism, say by creating VLANs?  I am having two 10G adapters in each of the VM server
    and would like to separate traffic of each of these networks.  Thanks in advance.

    Hi,
    10G adapter is the best NIC performance so with two NICs like this, i recommand you to use the bond0 (mode 1) for fault tolerance and use the VLAN technology to separate the Networks.
    Note that Oracle VM support the VLAN configuration.
    I hope this can help you
    Best Regards

  • Insert into multiple tables using a page variable

    Hi Guys,
    I was going to trawl the PL/SQL forum for this but as I need to use a page variable I thought I would try here first.
    I have 4 tables 2 live and 2 archive, company_table, company_table_arch, product, product_arch the tables are set up with a company Id as the join.
    you can have multiple products to a company.
    what I want to do is have an archive button on a form that will select the current record on the company table, and insert it into archive then select all records with that id in the product table and insert them into the product_arch table.
    I was thinking about doing this as a couple of page proccess, sound about right?
    the other option was using a package,
    is it possible to use page variables in a package? If so what is the sintax
    cheers
    Bjorn

    OK, I have got the basis of this working I press the archive button and the records update as per the code.
    I have one problem however.
    The button is on a form. and if the user updates the form then presses the archive button it copies the data before the table is updated (the table is updated using a save button).
    One way round this would be to jump to an "are you sure?" page
    Does anyone know a better way of doing this?
    cheers
    Bjorn

  • Inserting into two tables using JDBC Receiver Adapter

    I've defined following type for Receiver JDBC to save data in two different tables
    Name          Category     Type          Occurrence
    ReceiverDB_DT     Complex Type          
    STATEMENT     Element                    1..unbounded
    TABLE_NAME     Element                    1
    ACTION          Attribute     xsd:string     required
    TABLE          Element          xsd:string     1
    ACCESS          Element          Table1_DT     1
    STATEMENT2     Element                    1..unbounded
    TABLE_NAME     Element                    1
    ACTION          Attribute     xsd:string     required
    TABLE          Element          xsd:string     1
    ACCESS          Element          Table2_DT     1
    When I send data of two tables, it is showing data for both the two tables in MONI of PI System, but ultimately it shows only one table's data in message monitoring payload.
    what could be the problem?
    Thanks,
    -Haresh

    It solved!!!
    by just changing Occurrence only as rightly pointed by Ankesh
    Name          Category     Type          Occurrence
    ReceiverDB_DT     Complex Type          
    STATEMENT     Element                    1..unbounded
    TABLE_NAME     Element                    1
    ACTION          Attribute     xsd:string     required
    TABLE          Element          xsd:string     1
    ACCESS          Element          Table1_DT     1
    STATEMENT2     Element                    1..unbounded
    TABLE_NAME     Element                    1
    ACTION          Attribute     xsd:string     required
    TABLE          Element          xsd:string     1
    ACCESS          Element          Table2_DT     1
    Name          Category     Type          Occurrence
    ReceiverDB_DT     Complex Type          
    STATEMENT     Element                    1
    TABLE_NAME     Element                    1
    ACTION          Attribute     xsd:string     required
    TABLE          Element          xsd:string     1
    ACCESS          Element          Table1_DT     1..unbounded
    STATEMENT2     Element                    1
    TABLE_NAME     Element                    1
    ACTION          Attribute     xsd:string     required
    TABLE          Element          xsd:string     1
    ACCESS          Element          Table2_DT     1..unbounded
    Thanks a lot ankesh

  • Updating multiple tables using JDBC Adapter

    Hi,
    I am trying to insert/update multiple tables using one message via JDBC adapter. The following is the message being posted. However, only the first statement was executed. Anything wrong?
    Thanks in advance!
    Hart
    <?xml version="1.0" encoding="UTF-8"?>
    <ns0:DeliveryDBUpdate xmlns:ns0="http://test.com/r3_integration"><DeliveryData><DelHeader action="UPDATE_INSERT"><table>DelHeader</table><access><DelNo>0080000230</DelNo><DelType>LF</DelType><XOverwrite>X</XOverwrite><ShipTo>0000000026</ShipTo><SoldTo>0000000026</SoldTo><Priority>00</Priority><DocDate>02/17/2007</DocDate><GText>CIF Test</GText><DelDate>02/20/2007</DelDate><PickDate>02/20/2007</PickDate><ShipPoint>NO02</ShipPoint><PackCount>00000</PackCount></access><key><DelNo>0080000230</DelNo></key></DelHeader>
    <DelItem action="INSERT"><table>DelItem</table><access><DelNo>0080000230</DelNo><ItemNo>000010</ItemNo><GText>10# GRAN-GREAT VALUE</GText><Material>G04410G611</Material><Plant>6005</Plant><SLoc>6005</SLoc><RefDoc>mmenon32</RefDoc><RefItem>00000000</RefItem><DelQty>5.000</DelQty><UOM>BL</UOM></access><access><DelNo>0080000230</DelNo><ItemNo>000020</ItemNo><GText>25# GRAN- GREAT VALUE</GText><Material>G04025G611</Material><Plant>6005</Plant><SLoc>6005</SLoc><RefDoc>mmenon32</RefDoc><RefItem>00000000</RefItem><DelQty>5.000</DelQty><UOM>BG</UOM></access></DelItem></DeliveryData></ns0:DeliveryDBUpdate>

    Hi,
    You need 2 STATEMENT level tags,
    <?xml version="1.0" encoding="UTF-8"?>
    <ns0:DeliveryDBUpdate xmlns:ns0="http://test.com/r3_integration">
    <b><DeliveryData1></b>
    <DelHeader action="UPDATE_INSERT">
    <table>DelHeader</table>
    <access>
    <DelNo>0080000230</DelNo>
    <DelType>LF</DelType>
    <XOverwrite>X</XOverwrite>
    <ShipTo>0000000026</ShipTo>
    <SoldTo>0000000026</SoldTo>
    <Priority>00</Priority>
    <DocDate>02/17/2007</DocDate>
    <GText>CIF est</GText>
    <DelDate>02/20/2007</DelDate>
    <PickDate>02/20/2007</PickDate>
    <ShipPoint>NO02</ShipPoint>
    <PackCount>00000</PackCount>
    </access>
    <key>
    <DelNo>0080000230</DelNo>
    </key>
    </DelHeader>
    <b><DeliveryData1></b>
    <b><DeliveryData2></b>
    <DelItem action="INSERT">
    <table>DelItem</table>
    <access>
    <DelNo>0080000230</DelNo>
    <ItemNo>000010</ItemNo>
    <GText>10# GRAN-GREAT VALUE</GText>
    <Material>G04410G611</Material>
    <Plant>6005</Plant>
    <SLoc>6005</SLoc>
    <RefDoc>mmenon32</RefDoc>
    <RefItem>00000000</RefItem>
    <DelQty>5.000</DelQty>
    <UOM>BL</UOM>
    </access>
    <access>
    <DelNo>0080000230</DelNo>
    <ItemNo>000020</ItemNo>
    <GText>25# GRAN- GREAT VALUE</GText>
    <Material>G04025G611</Material>
    <Plant>6005</Plant>
    <SLoc>6005</SLoc>
    <RefDoc>mmenon32</RefDoc>
    <RefItem>00000000</RefItem>
    <DelQty>5.000</DelQty>
    <UOM>BG</UOM>
    </access>
    </DelItem>
    <b></DeliveryData2></b>
    </ns0:DeliveryDBUpdate>
    Try with such a strcuture and let us know if it works.
    Regards
    Bhavesh

  • Can we use single DB Adapter for multiple tables

    Hi,
    I have 3 tables. ONE is the Master table and other 2 tables having Primary and foreign key relationships with the Master Table.
    Data is enter in the Tables 2 & 3 (based on Master Table Primary key)
    I have to use a DB Adapter in BPEL Process which will be in Transaction (what type of Transaction is Best in such a Scenario).
    - How do i implement it in BPEL.
    - Can i use a Single DB Adapter for Multiple Tables ? (*Views* should not be created for tables 1, 2 & 3),
    as we want to avoid using multiple DB Adapters, as in future Tables may increase or decrease...
    - while in Transaction if Table 2 fails in Inserting / Updating, it should roll back on error and also if Table 3 fails in Inserting / Updating, it should roll back table 2 and Table 3.
    - how access to concurrent users is maintained / managed in such a scenarios.
    But everything should be done using Single DB Adapter without creating a separate view.
    Is this Possible in BPEL..
    If not, How do we design, Implementation such a BPEL Process in Transaction with a best in Performance (both BPEL Process & DB Resources)
    thanks in advance
    thanks & regards,
    anvv sharma

    Hi,
    Thanks for your quick response.
    I have few quires.
    If we use PL/SQL, how do we implement transaction and Exception Handling appropriately based on the Error / Exception in BPEL.
    If the Table 2 or Table 3 gives out Error / Exception, i have to handle it separately and intimate accordingly.
    Suppose, if Table 2 got Error / Exception - Error Handling would be 'Roll back due to error in Table2'
    Thanks & regads,

  • Adding data to multiple tables using one form in Access 2010?

    Hi All,
    I have a access database with two tables and I want to create a single form to enter data into that tables.
    How to adding data to multiple tables using one form in Access 2010?
    I don't have to much knowledge of access database?
    Please help me
    Thanks
    Balaji

    You really don't enter identical data into 2 tables.  You enter dat into one single table, and then you have an unique identifier that maps to another table (you have a unique relationship between two tables). 
    Maybe you need to read this.
    http://office.microsoft.com/en-001/access-help/database-design-basics-HA001224247.aspx
    Think about it this way...  What is you update data in 2 tables, and then the data in one of those tables changes, but the data in the other table does NOT change.  WHOOPS!!  Now, you've got a BIG problem.  For instance, you have a customer
    named Bill Gates.  In one Table you update Bill's address to 1835 73rd Ave NE, Medina, WA 98039 and in the other table you accidentally update Bill's address to 183 73rd Ave NE, Medina, WA 98039.  Now you have 2 addresses for Bill.  Why would
    you want that???  Which is right?  No one knows.  If you have one address, you just have to update one address and if there is a mistake, you just have to update one address, but you don't have to waste time trying to figure out which is right
    and which is wong...and then update the one that is wrong.
    Post back with specific questions.
    Knowledge is the only thing that I can give you, and still retain, and we are both better off for it.

  • Insert into multiple table view

    I have a view with multiple table query and and INSTEAD OF trigger on the view that inserts into multiple tables. When I attempt to do a commit out of a ADF Creation Form, I get the following error: ORA-01779: cannot modify a column which maps to a non key-preserved table ORA-06512: at line 1.
    Has anyone had success inserting into multiple tables via a view that has more than one table?
    Thanks,
    Lisa

    Lisa,
    Sounds like your instead-of trigger may not be being called and you are trying to insert directly into the view.
    I did write a [url http://stegemanoracle.wordpress.com/2006/03/15/using-updatable-views-with-adf/]blog entry about using a view with instead-of triggers last year.
    John

  • Load Multiple Table using SQLLDR

    Hi,
    We are trying to Load Multiple Table using SQLLDR in same loading session.
    Here's a snippet of our script:
    LOAD DATA INFILE '/u07/dd/yyyy_mm_dd.dat'
    append INTO TABLE table1
    WHEN STORE_NO != ' '
    STORE_NO position(1:5) ,
    TR_DATE position(6:27) DATE "mm/dd/yy
    truncate INTO TABLE table2
    WHEN STORE_NO != ' '
    STORE_NO position(1:5) ,
    TR_DATE position(6:27) DATE "mm/dd/yy
    Now upon execution this gives an error saying truncate shouldn't be present before 2nd INTO Clause. The script runs fine if we do same operation say Append / Replcae / Truncate on both tables. My Question here is can we have SQLLDR perform two diff operations (Append & Truncate in our case) in one session?
    Thanks
    Chinmay
    PS: Referred to http://www.orafaq.com/wiki/SQL*Loader_FAQ#Can_one_load_data_from_multiple_files.2F_into_multiple_tables_at_once.3F already

    No.
    did you read the syntax diagram and the paragraph below:
    "When you are loading a table, you can use the INTO TABLE clause to specify a table-specific loading method (INSERT, APPEND, REPLACE, or TRUNCATE) that applies only to that table. That method overrides the global table-loading method. The global table-loading method is INSERT, by default, unless a different method was specified before any INTO TABLE clauses."

  • Insert to multiple tables while keeping the referential integrity

    I would like to confirm whether we can have both updatable and reference for secondary entity. It seems to me that even though both updatable and reference can be checked for secondary entity, the secondary entity is not updatable.
    There are some scenarios that I hope to create the "parent" and "child" at the same time in the UI. For example, Employee and ProductExpertise which is in m:m relationship. We have three tables: Employee, EmployeeProduct, and Product. We have two view object, EmployeeVO which contains EmployeeEO, EmployeeProductVO which contains EmployeeProductEO and ProductEO. This can display EmployeeVO as master, and EmployeeProductVO as detail. However when we add a new product for the employee, we can only associate an existing product. We would like to create a new product and associate the product with employee. This cannot be achieved by the current EmployeeProductVO.
    I wonder if ADF supports inserting to multiple tables while keeping the foreign key reference integrity? In other words, in a 1:1..* (1 to 1 or 1 to many) relationship, must we have a master-detail view where we add parent first, then add child? Does ADF support adding both parent and child together with the correct foreign key assigned automatically for the child? Do we need to write code to do it?
    Any insight is appreciated.

    Hi,
    Assuming you are talking about ADF Business Components, yes, the framework can handle a batch insert that inserts both parent and child records in the same transaction. A few things that you may want to review:
    1). If you are using a database sequence for your primary keys (your question "Does ADF support adding both parent and child together with the correct foreign key assigned automatically for the child" made me think perhaps you were), have a read of the Fusion Developer's guide about the DBSequence type.
    2). In the same guide, have a read of section 38.8 - it talks about the small bit of code you may need to write to ensure the parent record is posted before the children, and also discusses about associations that are based on DB Sequences.
    Best,
    John

  • BizTalk 2013 R2 - Oracle client (Insert into Multiple tables) CompositE Transaction

    I know there is Composite Transaction of  inserting into multiple tables in SQL.
    Is there a way where we can have inserts into multiple table at once ? If yes, can anyone please provide step by step procedure to achieve this  
    MBH

    Here is a link on using Oracle DB w/ composite operations: 
    Performing Composite Operations on Oracle Database by Using BizTalk Server
    Rachit
    Please mark as answer or vote as helpful if my reply does

  • SQL Loader : Loading multiple tables using same ctl file

    Hi ,
    We tried loading multiple tables using the same ctl file but the data was not loaded and no errors were thrown.
    The ctl file content is summarised below :
    LOAD DATA
    APPEND INTO TABLE TABLE_ONE
    when record_type ='EVENT'
    TRAILING NULLCOLS
    record_type char TERMINATED BY ',' ,
    EVENT_SOURCE_FIELD CHAR TERMINATED BY ',' ENCLOSED BY '"',
    EVENT_DATE DATE "YYYY-MM-DD HH24:MI:SS" TERMINATED BY ',' ENCLOSED BY '"',
    EVENT_COST INTEGER EXTERNAL TERMINATED BY ',' ENCLOSED BY '"',
    EVENT_ATTRIB_1 CHAR TERMINATED BY ',' ENCLOSED BY '"',
    VAT_STATUS INTEGER EXTERNAL TERMINATED BY ',' ENCLOSED BY '"',
    ACCOUNT_REFERENCE CONSTANT 'XXX',
    bill_date "to_date('02-'||to_char(sysdate,'mm-yyyy'),'dd-mm-yyyy')",
    data_date "trunc(sysdate)",
    load_date_time "sysdate"
    INTO TABLE TABLE_TWO
    when record_type ='BILLSUMMARYRECORD'
    TRAILING NULLCOLS
    RECORD_TYPE char TERMINATED BY ',' ,
    NET_TOTAL INTEGER EXTERNAL TERMINATED BY ',' ENCLOSED BY '"',
    LOAD_DATE_TIME "sysdate"
    INTO TABLE BILL_BKP_ADJUSTMENTS
    when record_type ='ADJUSTMENTS'
    TRAILING NULLCOLS
    RECORD_TYPE char TERMINATED BY ',' ,
    ADJUSTMENT_NAME CHAR TERMINATED BY ',' ENCLOSED BY '"',
    LOAD_DATE_TIME "sysdate"
    INTO TABLE BILL_BKP_CUSTOMERRECORD
    when record_type ='CUSTOMERRECORD'
    TRAILING NULLCOLS
    RECORD_TYPE char TERMINATED BY ',' ,
    GENEVA_CUSTOMER_REF CHAR TERMINATED BY ',' ENCLOSED BY '"',
    LOAD_DATE_TIME "sysdate"
    INTO TABLE TABLE_THREE
    when record_type ='PRODUCTCHARGE'
    TRAILING NULLCOLS
    RECORD_TYPE char TERMINATED BY ',' ,
    PROD_ATTRIB_1_CHRG_DESC CHAR TERMINATED BY ',' ENCLOSED BY '"',
    LOAD_DATE_TIME "sysdate"
    Has anyone faced similar errors or are we going wrong somewhere ?
    Regards,
    Sandipan

    This is the info on the discard in the log file :
    Record 1: Discarded - failed all WHEN clauses.
    Record 638864: Discarded - failed all WHEN clauses.
    While some of the records were loaded for one table.
    Regards,
    Sandipan

  • Can select, but cannot insert into oracle tables using php.

    I am having trouble inserting data into a tables in oracle using PHP. I can insert into the tables using baninst1, but nothing else. I can't even insert using the tables' owner. Every time I try I get the ORA-00492 error of table or view does not exist. However, I can run a select statement just fine. So far, baninst1 is the only user that can actually do inserts. I've triple checked all the table grants and everything is fine. Also, I can copy/paste the exact insert statement into SQL*Plus and it works with the correct user. It doesn't have to be baninst1. I've tried everything I can think of. I've tried putting the table name in quotes, adding the schema name to the table, checking public synonyms, but everything appears to be ok. I would greatly appreciate any suggestions others may have.
    I'm using PHP 5.2.3 with an oracle 9i DB.

    Here is the code that doesn't work. It works only with baninst1, no other username will work and all I do is change the my_username/my_password to something different. This is one example function where I try to do an insert, but it doesn't work on any of the tables I try.
    Thanks for looking.
    class Oracle {
         private $oracleUser = "my_username";
         private $oraclePassword = "my_password";
         private $oracleDB = "MY_DB";
         private $c = null;
         function Connect() {
              if ( !($this->c = ocilogon( $this->oracleUser, $this->oraclePassword, $this->oracleDB ) ) )
                   return false;
              return true;
         function AddNewTest($testName, $course, $section, $term, $maxAttempts, $length, $startDate, $startTime, $endDate, $endTime)
              $result = "";
              if( $this->c == null )
                   $this->Connect();     
              $splitIndex = strpos($course, " ");
              $subjectCode = substr($course, 0, $splitIndex);
              $courseNumber = substr($course, $splitIndex + 1);
              $insertStatment = "insert into szbtestinfo(szbtestinfo_test_name,
                                                                szbtestinfo_course_numb,
                                                           szbtestinfo_section,
                                                                szbtestinfo_max_attempts,
                                                                szbtestinfo_length_minutes,
                                                                szbtestinfo_start,
                                                                szbtestinfo_end,
                                                                szbtestinfo_id,
                                                                szbtestinfo_subj_code,
                                                                szbtestinfo_eff_term)
                                                                values( '" . $testName .
                   "', '" . $courseNumber .
                   "', '" . $section .
                   "', " . $maxAttempts .
                   ", " . $length .
                   ", to_date('" . $startDate . " " . $startTime . "', 'MM/DD/YYYY HH24:MI')" .
                   ", to_date('" . $endDate . " " . $endTime . "', 'MM/DD/YYYY HH24:MI')" .
                   ", szsnexttest.nextval" .
                   ", '" . $subjectCode .
                   "', '" . $term . "')";
              //return $insertStatment;
              $s = OCIParse($this->c, $insertStatment);
              try
                   $result = OCIExecute($s);
              catch(exception $e)
              return $result;
         }

  • Save file in multiple directories using receiver file adapter?

    Hi,
    Is it posible to save file in multiple directories using receiver file adapter?
    Regards,
    Ashish

    Well, there is a round about way to do that -
    The idea is to use multi mapping. 1:n mapping
    1) Map ur message to 2 different record set nodes. Since you want to use the same file both the mapping will look exactly the same. make sure that the filepath and filename are a part of the output payload message
    2) In the file adapter config. make sure the the file name and file path are from these payload fields. You can use a context object to refer these fields. Voila...the files are created in the 2 direcoties you mentioned.
    of course the simplest way is to route the same message to 2 business systems/services and write them out using 2 ccs.,
    Arvind R

Maybe you are looking for