Updating/Inserting multiple tables

Hi,
I've been trying to figure out how to update/insert multiple fields in 2 different tables with one RowSet. im new to java and have been using Creator for about 2 weeks
basically there are 3 tables: one containing user info(USER), one containing department info (DEPT), and one table relating the two (USER_DEPT). my form lets uers update, among others, their NAME in table USER, and DEPT_NAME in table DEPT.
These are all VARCHAR types.
I used the Clips provided by Creator to initialize and do the updating. i am using updateRow() to do the updating. the fields are bound to specific database fields. the RowSet is updatable.
in my app i chose some specific fields, but for the sake of avoiding pasting very long SQL queries lets just say i chose everything. some of the queries i tried:
SELECT *
FROM USER WHERE USER.USERNAME = ?This one works.
SELECT *
FROM USER, DEPT, USER_DEPT
where USER.ID = USER_DEPT.USER_ID
and DEPT.ID = USER_DEPT.DEPT_ID AND USER.USERNAME = ?this one gives me a Conversion Error message. i have no conversion going on whatsoever. i havent even learned how to use conversion yet.
another query i tried:
SELECT * FROM USER
INNER JOIN USER_DEPT ON USER.ID = USER_DEPT.USER_ID
INNER JOIN DEPT ON DEPT.ID = USER_DEPT.DEPT_ID
WHERE USER.USERNAME=?this one gives me no error. the app works except the database doesnt get updated. i have determined that when using this query updateRow() is skipped. i dont know why. the app keeps running in that it goes to the next page as defined by the XML, but updateRow() is never called.
so can anyone please tell me how to update/insert multiple fields in multiple tables using one RowSet PLEASE?
THANKS!

The only way this can be done with a single rowset is if you do your query against a view (instead of a join), and if your JDBC driver supports updates to multiple tables through a view. Otherwise, you're going to need to update the underlying tables individually.
Craig

Similar Messages

  • How to Query and Update/Insert Large Tables ...

    I have the following 2 tables:
    Table 1: Pricing
    This table holds pricing details of all Items (roughly 150,000 items). One Item has three types of prices Standard, Promotion, and Discounted. Therefore the table contains roughly 150,000 * 3 records. Also the prices may get updated frequently every day.
    Item#---Type------------FromDate---ToDate-----Price
    ===================================
    AAA-----Standard------01/01/05---31/12/05---1.50
    AAA-----Promotion----16/12/05---20/12/05---1.40     
    AAA-----Discounted---10/12/05---15/12/05---1.20
    BBB-----Standard------01/01/05---31/12/05---1.60
    BBB-----Promotion----17/12/05---18/12/05---1.30
    BBB-----Discounted---10/12/05---15/12/05---1.50
    Table 2: BestPrice
    At a given date, this table contains the best price (lowest price) of each item for the following 21 days (including the current date). The POS system is accessing this table to get the daily best price for billing customers.
    Item#----Date--------BestPrice
    =====================
    AAA------17/12/05----1.40
    AAA------18/12/05----1.40     
    AAA------19/12/05----1.40
    AAA------20/12/05----1.40
    AAA------21/12/05----1.50
    BBB------17/12/05----1.30
    BBB------18/12/05----1.30
    BBB------19/12/05----1.60
    BBB------20/12/05----1.60
    BBB------21/12/05----1.60
    Problem Statement:
    Table 2 (BestPrice) needs to get updated from Table 1 (Pricing) at least once every day with the best price for each item for the next 21 days (including the current day). What’s the most efficient method to perform this job?

    I don't know really why your application needs to use BestPrice table!
    It is not clear what it does for it because querying will not be better than querying the pricing table. This will be very fast with an index on intem#
    On the other hand, why do you use three rows per item in Pricing table? it could be one row per item.
    Any way, to populate the table for the first time :
    insert into bestprice
    select item#
         , dte
         , min(price) bestprice
    from pricing, (select trunc(sysdate) + rownum - 1 dte from dual connect by rownum <= 21) t
    where  dte  between fromdate and todate
    group by dte, item#Now, you can have a row trigger (update) on Pricing table which can change BestPrice table according to a change in Pricing tabe.
    Then you have to use a daily job that can be based on the following statement:
    update BestPrice B
    set dte = trunc(sysdate) + 20
      , BestPrice =
             select min(price)
             from Pricing P
             where P.item# = B.item#
                and B.dte between P.FromDate and P.ToDate
    where dte = trunc (sysdate) - 1Message was edited by:
    Michel SALAIS
    I forgot to say that that if your periods in the pricing table don't covere a desired date in the BestPrice table then my insert statement will not treat it and my update will put it to NULL

  • SQL Update to multiple tables

    I am trying to write an update statement that will allow me to 'SET' values on multiple tables.
    Ex.
    Table1
    Fields are: EmployeeID; Name; DOB
    Table2
    Fields are: SSN; Address
    I want to write a statement like so
    update set table1.employeeID='ABC', table2.Address='123 Oars Ferry' where EmployeeID='123456'
    However, when I run this statement it doesn't work. Any ideas on how I could write this statement to get it working would be appreciated.

    Normally, you'd just execute two separate UPDATE statements here. If the two statements will always be run together and always need to succeed or fail together, you'd probably want to create a stored procedure that did both updates and to just call the stored procedure from your application.
    Depending on the table structure, you may be able to join table1 and table2 to create a key-preserved view and update that, i.e.
    UPDATE (SELECT <<list of columns>>
             FROM table1, table2
            WHERE <<some conditions>>)
      SET ...This is generally, however, going to be substantially less clear than two simple update statements.
    Justin

  • Update from multiple tables

    Hi friends, need help with the following
    I need to convert the following SQL Server query to Oracle Pl/sql
    UPDATE
    perf
    SET perf.value5 = tmp.storeCount
    FROM dplapro1..ix_spc_performance perf
    INNER JOIN dplapro1..ix_spc_planogram plano ON plano.dbkey = perf.dbparentplanogramkey
    INNER JOIN #TMP_StoreCount tmp ON plano.dbkey6 = tmp.cmkey
    WHERE
    perf.dbparentproductkey = tmp.productkey
    I did the following:
    UPDATE dplapro1.ix_spc_performance perf
    SET perf.value5 =
    SELECT tmp.storeCount
    FROM dplapro1.ix_spc_performance perf
    INNER JOIN dplapro1.ix_spc_planogram plano
    ON plano.dbkey = perf.dbparentplanogramkey
    INNER JOIN tt_433_storecount tmp
    ON plano.dbkey6 = tmp.cmkey
    WHERE perf.dbparentproductkey = tmp.productkey
    which gives me error 'single row subquery returns more than one row',
    Then I tried :
    UPDATE dplapro1.ix_spc_performance perf
    SET perf.value5 =
    SELECT tmp.storeCount
    FROM dplapro1.ix_spc_performance perf
    INNER JOIN dplapro1.ix_spc_planogram plano
    ON plano.dbkey = perf.dbparentplanogramkey
    INNER JOIN tt_433_storecount tmp
    ON plano.dbkey6 = tmp.cmkey
    WHERE perf.dbparentproductkey = tmp.productkey
    where perf.ROWID IN
    SELECT perf.ROWID
    FROM dplapro1.ix_spc_performance perf
    INNER JOIN dplapro1.ix_spc_planogram plano
    ON plano.dbkey = perf.dbparentplanogramkey
    INNER JOIN tt_433_storecount tmp
    ON plano.dbkey6 = tmp.cmkey
    WHERE perf.dbparentproductkey = tmp.productkey
    no luck with this either
    Please help me with this
    Thanks

    I think something like this will do it for you
    MERGE
    INTO dplapro1.ix_spc_performance D
    USING ( SELECT productkey,
                   storecount
              FROM dplapro1.ix_spc_planogram plano
        INNER JOIN tt_433_storecount tmp
                ON plano.dbkey6 = tmp.cmkey
             WHERE perf.dbparentproductkey = tmp.productkey ) S
       ON ( D.dbparentproductkey = S.productkey )
      WHEN MATCHED THEN UPDATE
               SET D.value5 = s.storecount;You need to make sure that the source of the updates - USING clause - returns at most one row for each key in the destination, based on the ON clause. That is, in this case, only one productkey for each dbparentproductkey .

  • How to alter a Form to modify multiple tables

    I want to create a form that will insert or update into multiple tables at once.
    I have provided a picture of what i have in mind: http://imageshack.us/photo/my-images/21/custformexample.jpg
    In this example I have 3 tables:
    Customer (Cust_ID, Name,Address,Email,Phone);
    Account_Manager(AM_ID, Name,Address,Email);
    Customer_Account_Managers(Cust_ID,AM_ID);
    A customer can have 0 to many Account Managers.
    I have created a form on table with report with which I can see a report of all customers and click Edit to edit a customer or Create to create a new one.
    In this form I want to add a select list that includes all Managers (I know how to create a select list and how to access it's value). I also want a report on the Account Managers which are associated with the customer, and I want to be able to add to this list, which will be saved into the Customer_Account_managers table as soon as i click Save.
    Please provide me with some tips as to how to do this.
    Thanks a lot!

    Always include the following information when asking a question:
    <ul>
    <li>Full APEX version</li>
    <li>Full DB/version/edition/host OS</li>
    <li>Web server architecture (EPG, OHS or APEX listener/host OS)</li>
    <li>Browser(s) and version(s) used</li>
    <li>Theme</li>
    <li>Template(s)</li>
    <li>Region/item type(s)</li>
    </ul>
    popovitsj wrote:
    I want to create a form that will insert or update into multiple tables at once.
    I have provided a picture of what i have in mind: http://imageshack.us/photo/my-images/21/custformexample.jpg
    In this example I have 3 tables:
    Customer (Cust_ID, Name,Address,Email,Phone);
    Account_Manager(AM_ID, Name,Address,Email);
    Customer_Account_Managers(Cust_ID,AM_ID);
    A customer can have 0 to many Account Managers.
    I have created a form on table with report with which I can see a report of all customers and click Edit to edit a customer or Create to create a new one.
    In this form I want to add a select list that includes all Managers (I know how to create a select list and how to access it's value). I also want a report on the Account Managers which are associated with the customer, and I want to be able to add to this list, which will be saved into the Customer_Account_managers table as soon as i click Save.You can create a database views based on these tables, and create a instead of insert/update/delete trigger to populate the corresponding tables when fired.
    Create an APEX form using wizard based on this database view.

  • Reports using multiple tables

    I am trying to create a report using portal that use links between multiple columns. The info I want is mainly in two tables. Some of the info in the table is numeric (Foreign Keys). I want to display them in readable format so set up joins to the respective parent tables. When I do this the result only produces 12 lines of output irrespective of the number of lines I set per page. When I show only the data from the main tables, without the joins to the other parent tables, i.e. the foreign keys as numbers I get all the rows. I have tried to create the report by using all three options given but get the same result.
    I am using 9iAS verison 1.0.2.0 and Portal version 3.0.7.
    Can someone please explain why this happens and how I can solve this problem urgently.

    Hi Ashok,
    Sorry for posting the solution with delay. Actually I ran into the similar situation and upon deep analysis, I could crack it., the very next day.
    This is how your write back template should be for updating on multiple tables
    <?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="WRITE">
    <XML>
    <writeBack connectionPool="Oracle Data Warehouse Connection Pool">
    <insert> </insert>
    <update> UPDATE FACT SET COUNT = '@{c4}', W_UPDATE_DT = CURRENT_DATE
    WHERE EXISTS (SELECT ROW_WID FROM DIM WHERE DIM.ROW_WID = FACT.DIM_WID AND
    DIM.X = '@{c1}' AND DIM.Y= '@{c2}' AND DIM.Z = '@{c3}' ) AND EXISTS (SELECT ROW_WID FROM DT WHERE DT.ROW_WID = FACT.DT_WID AND DT.PER_NAME_YEAR = '@{c0}') </update>
    </writeBack>
    </XML>
    </WebMessage>
    </WebMessageTable>
    </WebMessageTables>
    =====
    Using exits, will improve the performance.
    Hope it helps. If yes, pls award points. Thanks
    Regards,
    Sarat Nallapati

  • What's the best way to insert/update thousands records in multiple tables

    Can anyone give an example of how to insert/update thousands records in multiple tables on performance wise? or what should I do to improve the performance?
    Thanks
    jim

    You can see a set of sample applications in various scenarious available at
    http://otn.oracle.com/sample_code/tech/java/sqlj_jdbc/content.html

  • MULTIPLE UPDATES/INSERTIONS TO THE SAME TABLE

    How can I update/insert mutiple rows into the same table from one form ?

    Hi,
    Using the portal form on table you can insert only a single row. You can use master-detail form to insert multiple rows.
    Thanks,
    Sharmila

  • Insert/update multiple tables from one form.

    I'm working on an app. that requires the user to fill out a form. The contents from the form is then used to either insert new records or update existing records in multiple tables. Is that possible? Can someone give a details example?

    You should create a form like you would create it having one table. Use row_id as primary key. The rest of the process are done by the triggers - those will take care of updating the right table depending which column was hit.
    Denes Kubicek
    http://deneskubicek.blogspot.com/
    http://www.opal-consulting.de/training
    http://apex.oracle.com/pls/otn/f?p=31517:1
    http://www.amazon.de/Oracle-APEX-XE-Praxis/dp/3826655494
    -------------------------------------------------------------------

  • Want to update data in a view based on multiple tables

    Hi
    I am facing a problem i want to update data in tables using a view. As that view is based on multiple tables so i am unable to update data. i came to know we can update table from view only if view is based on single table. so if anyone knows any alternative please let me know.
    Thanx
    Devinder

    Devinder,
    The table can be updated through a view based on multiple tables, if and only if the table is a "key preserved" table. Rather than explaining myself, i avoided the burden of typing by finding the material in Oracle Docs and pasting it for you :-)
    If you want a join view to be updatable, all of the following conditions must be
    true:
    1. The DML statement must affect only one table underlying the join.
    2. For an INSERT statement, the view must not be created WITH CHECK
    OPTION, and all columns into which values are inserted must come from a
    key-preserved table. A key-preserved table in one for which every primary
    key or unique key value in the base table is also unique in the join view.
    3. For an UPDATE statement, all columns updated must be extracted from a
    key-preserved table. If the view was created WITH CHECK OPTION, join
    columns and columns taken from tables that are referenced more than once
    in the view must be shielded from UPDATE.
    4. For a DELETE statement, the join can have one and only one key-preserved
    table. That table can appear more than once in the join, unless the view was
    created WITH CHECK OPTION.
    HTH
    Naveen

  • How to update fields in multiple tables ?

    Dear all,
    What is the fastest way to update fields in multiple tables... from a single change table...as below is my code to update the fields but it is taking long time to update as i need to keep log file if any one update fails....
    CREATE OR REPLACE
    package body DO_DC_NAME_UPDATE_OTHER_TAB
    as
    type rowidArray is table of rowid index by binary_integer;
    type custRec is record
    n_cust_ref_no dbms_sql.number_table,
    v_name dbms_sql.varchar2_table,
    v_name_chg dbms_sql.varchar2_table,
    rowid rowidArray,
    changed dbms_sql.varchar2_table
    procedure VALIDATE_CUST_NAME( p_n_cust_ref_no in number,p_v_name_chg in out NOCOPY varchar2, p_changed in out NOCOPY varchar2 )
    is
    begin
    FOR cr_cust IN (SELECT --a.n_cust_ref_no,a.v_name,UPD_V_NAME, a.n_weight,a.V_LASTUPD_INFTIM
    from GNMT_CUSTOMER_MASTER_CHG where n_cust_ref_no=p_n_cust_ref_no)
         loop
    -- v_name
    if nvl(trim(cr_cust.v_name),0) != nvl(p_v_name_chg,0)
    then
              p_v_name_chg := p_v_name_chg;
              --p_v_name := p_v_name;
              p_changed := 'Y';
    end if;
         end loop;
    end;
    procedure DO_NAME_UPDATE_OTHER_TAB
    is
    l_record custRec;
    l_array_size number default 20000;
    l_done boolean;
    l_cnt number default 1;
    cursor c is select a.n_cust_ref_no, a.v_name,a.v_name_chg, a.rowid, 'N'
                        from GNMT_CUSTOMER_MASTER_CHG a--,GNMT_CUSTOMER_MASTER b
                        where a.v_name <> trim(a.v_name_chg); --and  a.n_cust_ref_no in (1434775,1561181,1601870);
    begin
    open c;
    loop
    dbms_application_info.set_client_info
    ( 'processing ' || l_cnt || ' thru ' || (l_cnt+l_array_size-1) );
    fetch c bulk collect into l_record.n_cust_ref_no, l_record.v_name,l_record.v_name_chg,l_record.rowid, l_record.changed
    LIMIT l_array_size;
    l_done := c%notfound;
    --dbms_output.put_line ('message10');
    for i in 1 .. l_record.n_cust_ref_no.count
    loop
    VALIDATE_CUST_NAME(l_record.n_cust_ref_no(i),l_record.v_name_chg(i),l_record.changed(i) );
    end loop;
    --dbms_output.put_line (l_record.n_cust_ref_no(i)||','||l_record.V_OCCUP_CODE(i)||','||l_record.CHANGED(i));
    /*forall i in 1 .. l_record.n_cust_ref_no.count
    update GNMT_CUSTOMER_MASTER q
    set q.v_name = l_record.v_name_chg(i)
    where q.n_cust_ref_no = l_record.n_cust_ref_no(i)
    and trim(q.v_name) = l_record.v_name(i)
    and l_record.changed(i) = 'Y';*/
    -- update v_name in all the related tables
    forall i in 1 .. l_record.n_cust_ref_no.count
    update ADE_CUSTOMER_MASTER q
    set q.v_NAME = l_record.v_name_chg(i)
    where q.n_cust_ref_no = l_record.n_cust_ref_no(i)
    and trim(q.v_name) = l_record.v_name(i)
    and l_record.changed(i) = 'Y'
    and q.v_NAME is not null;
    forall i in 1 .. l_record.n_cust_ref_no.count
    update GNMT_POLICY_DETAIL q
    set q.v_NAME = l_record.v_name_chg(i)
    where q.n_cust_ref_no = l_record.n_cust_ref_no(i)
    and trim(q.v_name) = l_record.v_name(i)
    and l_record.changed(i) = 'Y'
    and q.v_NAME is not null;
    forall i in 1 .. l_record.n_cust_ref_no.count
    update GNMT_QUOTATION_DETAIL q
    set q.v_NAME =l_record.v_name_chg(i)
    where q.n_cust_ref_no = l_record.n_cust_ref_no(i)
    and trim(q.v_name) = l_record.v_name(i)
    and l_record.changed(i) = 'Y'
    and q.v_NAME is not null;
    forall i in 1 .. l_record.n_cust_ref_no.count
    update NBDT_BENEFICIARY q
    set q.V_NAME = l_record.v_name_chg(i)
    where q.n_cust_ref_no = l_record.n_cust_ref_no(i)
    and trim(q.V_NAME) = l_record.v_name(i)
    and l_record.changed(i) = 'Y'
    and q.v_NAME is not null;
    forall i in 1 .. l_record.n_cust_ref_no.count
    update PSDT_NOMINATION_TRANSACTION q
    set q.V_NAME = l_record.v_name_chg(i)
    where q.n_cust_ref_no = l_record.n_cust_ref_no(i)
    and trim(q.V_NAME) = l_record.v_name(i)
    and l_record.changed(i) = 'Y'
    and q.v_NAME is not null;
    forall i in 1 .. l_record.n_cust_ref_no.count
    update PSMT_POLICY_BENEFICIARY q
    set q.V_NAME = l_record.v_name_chg(i)
    where q.n_cust_ref_no = l_record.n_cust_ref_no(i)
    and trim(q.V_NAME) = l_record.v_name(i)
    and l_record.changed(i) = 'Y'
    and q.v_NAME is not null;
    commit;
    forall i in 1 .. l_record.n_cust_ref_no.count
    update PSMT_POLICY_TRUSTEE q
    set q.V_NAME = l_record.v_name_chg(i)
    where q.n_cust_ref_no = l_record.n_cust_ref_no(i)
    and trim(q.V_NAME) = l_record.v_name(i)
    and l_record.changed(i) = 'Y'
    and q.v_NAME is not null;
    forall i in 1 .. l_record.n_cust_ref_no.count
    update PSMT_QUOTATION_BENEFICIARY q
    set q.V_NAME = l_record.v_name_chg(i)
    where q.n_cust_ref_no = l_record.n_cust_ref_no(i)
    and trim(q.V_NAME) = l_record.v_name(i)
    and l_record.changed(i) = 'Y'
    and q.v_NAME is not null;
    forall i in 1 .. l_record.n_cust_ref_no.count
    update PSMT_QUOTATION_TRUSTEE q
    set q.V_NAME = l_record.v_name_chg(i)
    where q.n_cust_ref_no = l_record.n_cust_ref_no(i)
    and trim(q.V_NAME) = l_record.v_name(i)
    and l_record.changed(i) = 'Y'
    and q.v_NAME is not null;
    commit;
    forall i in 1 .. l_record.n_cust_ref_no.count
    update GNDT_BLACKLIST_DETAIL q
    set q.v_FNAME = l_record.v_name_chg(i)
    where q.n_cust_ref_no = l_record.n_cust_ref_no(i)
    and trim(q.v_FNAME) = l_record.v_name(i)
    and l_record.changed(i) = 'Y'
    and q.v_FNAME is not null;
    forall i in 1 .. l_record.n_cust_ref_no.count
    update INDT_LIAM_DETAIL q
    set q.v_FNAME = l_record.v_name_chg(i)
    where q.n_cust_ref_no = l_record.n_cust_ref_no(i)
    and trim(q.v_FNAME) = l_record.v_name(i)
    and l_record.changed(i) = 'Y'
    and q.v_FNAME is not null;
    commit;
    forall i in 1 .. l_record.n_cust_ref_no.count
    update GNMT_POLICY q
    set q.V_PAYER_NAME = l_record.v_name_chg(i)
    where q.N_PAYER_REF_NO = l_record.n_cust_ref_no(i)
    and trim(q.V_PAYER_NAME) = l_record.v_name(i)
    and l_record.changed(i) = 'Y'
    and q.V_PAYER_NAME is not null;
    commit;
    forall i in 1 .. l_record.n_cust_ref_no.count
    update GNMT_QUOTATION q
    set q.V_PAYER_NAME = l_record.v_name_chg(i)
    where q.N_PAYER_REF_NO = l_record.n_cust_ref_no(i)
    and trim(q.V_PAYER_NAME) = l_record.v_name(i)
    and l_record.changed(i) = 'Y'
    and q.V_PAYER_NAME is not null;
    commit;
    forall i in 1 .. l_record.n_cust_ref_no.count
    update GNMT_QUOTATION q
    set q.V_PROPOSER_NAME = l_record.v_name_chg(i)
    where q.N_PROPOSER_REF_NO = l_record.n_cust_ref_no(i)
    and trim(q.V_PROPOSER_NAME) = l_record.v_name(i)
    and l_record.changed(i) = 'Y'
    and q.V_PROPOSER_NAME is not null;
    forall i in 1 .. l_record.n_cust_ref_no.count
    update GNMT_POLICY q
    set q.V_PROPOSER_NAME = l_record.v_name_chg(i)
    where q.N_PROPOSER_REF_NO = l_record.n_cust_ref_no(i)
    and trim(q.V_PROPOSER_NAME) = l_record.v_name(i)
    and l_record.changed(i) = 'Y'
    and q.V_PROPOSER_NAME is not null;
    forall i in 1 .. l_record.n_cust_ref_no.count
    update CLMT_CLAIM_MASTER q
    set q.V_CLIENT_NAME = l_record.v_name_chg(i)
    where q.N_CLIENT_REF_NO = l_record.n_cust_ref_no(i)
    and trim(q.V_CLIENT_NAME) = l_record.v_name(i)
    and l_record.changed(i) = 'Y'
    and q.V_CLIENT_NAME is not null;
    forall i in 1 .. l_record.n_cust_ref_no.count
    update CLMT_CLAIM_MASTER q
    set q.V_INTIMATOR_NAME = l_record.v_name_chg(i)
    where q.N_CLIENT_REF_NO = l_record.n_cust_ref_no(i)
    and trim(q.V_INTIMATOR_NAME) = l_record.v_name(i)
    and l_record.changed(i) = 'Y'
    and q.V_INTIMATOR_NAME is not null;
    forall i in 1 .. l_record.n_cust_ref_no.count
    update PYMT_VOU_MASTER q
    set q.V_PAYEE_NAME = l_record.v_name_chg(i)
    where q.n_cust_ref_no = l_record.n_cust_ref_no(i)
    and trim(q.V_PAYEE_NAME) = l_record.v_name(i)
    and l_record.changed(i) = 'Y'
    and q.V_PAYEE_NAME is not null;
    /*forall i in 1 .. l_record.n_cust_ref_no.count
         INSERT INTO GNMT_CUSTOMER_MASTER_LOG
              (N_CUST_REF_NO, V_TITLE_CODE, V_NAME, D_BIRTH_DATE, V_SEX, V_RELIGION_CODE, V_NATION_CODE, V_OCCUP_CODE, V_ALIVE, V_SMOKER,
              N_NO_STICKS, D_DEATH_DATE, V_BUMI_NON_BUMI, V_AGE_ADMITTED, V_SHORT_NAME, V_FIRST_NAME, V_LAST_NAME, V_EMAIL, V_DESIGNATION,
              N_HEIGHT,N_WEIGHT,V_TITLE_CODE_CHG, V_NAME_CHG, D_BIRTH_DATE_CHG, V_SEX_CHG,V_RELIGION_CODE_CHG,V_NATION_CODE_CHG, V_OCCUP_CODE_CHG, V_ALIVE_CHG,
              V_SMOKER_CHG, N_NO_STICKS_CHG, D_DEATH_DATE_CHG,V_BUMI_NON_BUMI_CHG, V_AGE_ADMITTED_CHG, V_SHORT_NAME_Chg, V_FIRST_NAME_Chg,
              V_LAST_NAME_Chg, V_EMAIL_Chg, V_DESIGNATION_Chg,N_HEIGHT_Chg,N_WEIGHT_Chg, V_UPD_STATUS_DC,-- V_LASTUPD_PROG, V_LASTUPD_INFTIM,
              V_LASTUPD_USER_DC, V_LASTUPD_PROG_DC,V_LASTUPD_INFTIM_DC
              SELECT N_CUST_REF_NO, V_TITLE_CODE, V_NAME, D_BIRTH_DATE, V_SEX, V_RELIGION_CODE, V_NATION_CODE, V_OCCUP_CODE, V_ALIVE, V_SMOKER,
              N_NO_STICKS, D_DEATH_DATE, V_BUMI_NON_BUMI, V_AGE_ADMITTED, V_SHORT_NAME, V_FIRST_NAME, V_LAST_NAME, V_EMAIL, V_DESIGNATION,
              N_HEIGHT,N_WEIGHT,V_TITLE_CODE_CHG, V_NAME_CHG, d_birth_date_chg, V_SEX_CHG, V_RELIGION_CODE_CHG,V_NATION_CODE_CHG, V_OCCUP_CODE_CHG, V_ALIVE_CHG,
              V_SMOKER_CHG, N_NO_STICKS_CHG, D_DEATH_DATE_CHG, V_BUMI_NON_BUMI_CHG, V_AGE_ADMITTED_CHG, V_SHORT_NAME_Chg, V_FIRST_NAME_Chg,
              V_LAST_NAME_Chg, V_EMAIL_Chg, V_DESIGNATION_Chg,N_HEIGHT_Chg,N_WEIGHT_Chg--, V_LASTUPD_USER, V_LASTUPD_PROG, V_LASTUPD_INFTIM
              ,'PROCESSED'
              ,user,--P_USER,
              'DC_PAKAGE',
              sysdate--P_DATE
              FROM GNMT_CUSTOMER_MASTER_CHG where n_cust_ref_no =l_record.n_cust_ref_no(i)
              --and n_cust_ref_no not in (select n_cust_ref_no from GNMT_CUSTOMER_MASTER_LOG);*/
    exit when (l_done);
    l_cnt := l_cnt + l_array_size;
    end loop;
    commit;
    end;
    end;
    thank You

    Dear SeánMacGC thanks for reply,
    But "a.changed" is not a field in GNMT_CUSTOMER_MASTER_CHG. what i am doing in this procedure is i am collecting bulck data and validating field by field from GNMT_CUSTOMER_MASTER_CHG with GNMT_CUSTOMER_MASTER table as their structure is same.. if v_name is not same as v_name_chg then i am setting changed flag to "Y" changed is "changed dbms_sql.varchar2_table" and updating GNMT_CUSTOMER_MASTER in bluck where changed flag ='Y'...
    type custRec is record
    n_cust_ref_no dbms_sql.number_table,
    v_name dbms_sql.varchar2_table,
    v_name_chg dbms_sql.varchar2_table,
    rowid rowidArray,
    *changed dbms_sql.varchar2_table*
    i cannot use simple SQL as i need to validate field for each records with GNMT_CUSTOMER_MASTER_CHG and insert into log file as well.....
    to run this procedure:
    execute DO_DC_NAME_UPDATE_OTHER_TAB.DO_NAME_UPDATE_OTHER_TAB;
    Thanks...

  • How to update flag in multiple tables using custom sql DB adapter

    hi all,
    I have a scenario: I want to update flags in multiple tables in DB2. I have used toplink update only to update all tabless after creating relationships between them. But that approach is not working as it couldnot detect emmisions with DB2 and update the complete record with blank values in other columns.
    So, i want to use custom sql now. Can anybody help in resolving the issue or in writing the custom sql.
    Regards
    Richa

    Dear SeánMacGC thanks for reply,
    But "a.changed" is not a field in GNMT_CUSTOMER_MASTER_CHG. what i am doing in this procedure is i am collecting bulck data and validating field by field from GNMT_CUSTOMER_MASTER_CHG with GNMT_CUSTOMER_MASTER table as their structure is same.. if v_name is not same as v_name_chg then i am setting changed flag to "Y" changed is "changed dbms_sql.varchar2_table" and updating GNMT_CUSTOMER_MASTER in bluck where changed flag ='Y'...
    type custRec is record
    n_cust_ref_no dbms_sql.number_table,
    v_name dbms_sql.varchar2_table,
    v_name_chg dbms_sql.varchar2_table,
    rowid rowidArray,
    *changed dbms_sql.varchar2_table*
    i cannot use simple SQL as i need to validate field for each records with GNMT_CUSTOMER_MASTER_CHG and insert into log file as well.....
    to run this procedure:
    execute DO_DC_NAME_UPDATE_OTHER_TAB.DO_NAME_UPDATE_OTHER_TAB;
    Thanks...

  • Inserting table in web form/ Inserting multiple cells in a single row

    Dear Mr Johnson,
    Thanks for your early reply.
    I am rather disappointed .....as I need to distribute my form urgently with a table insertion capability.
    I had purchased Adobe webform central subscription with the idea that a paid subscription will fetch me the full editing capability of the Adobe form central web forms.
    Please inform me as to when this vital update regarding the table insertion/ multiple cells insertion in a single row capability (update) will be functional and available for our use as today is 26th of January, 2013.
    Kindly reply ASAP.
    Thanks,
    with kind regards,
    Dr Ali

    See this thread from two days ago where Randy Swineford of Adobe says that it is expected to be added at the end of January: http://forums.adobe.com/thread/1140470?tstart=0
    I don't know if it will include a table tool.

  • 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

  • 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

Maybe you are looking for

  • Sun One Application Server 7 SSL Reverse Proxy Setup?

    Hi, I've made a similiar post on the Web Server forum, http://forum.sun.com/jive/thread.jspa?threadID=95666&tstart=0 I've noticed there's a reverse proxy plug in setup for Web Server, as well as a AddOn package for Application Server. I've so far suc

  • Error Ocurred while processing a data cube

    While processing a cube i am getting following errors:- please help me out to fix it 1) Errors in the high-level relational engine. The following exception occurred while an operation was being performed on a data source view: Method not found: 'Syst

  • HT4436 Can I get my Outlook Calendar to update to ICloud so it will update my IPod Touch

    I joined Icloud on my IPod touch and my home computer but my calendar does not sync,.  I do not know if I need to do something or if it just will not work because it is in Microsoft Outlook.

  • FRM-92101 No longer being raised

    After applying (9.0.4) Patch Set 1 (9.0.4.1.0) and OPatch 3901078, when a forms session is aborted (due to an Access Violation or having been killed from OEM) the applet on the client simply hangs. Prior to applying the patches, this would have raise

  • Added drag support breaks drop support

    I have a Swing app (running on WIndows), which consists mainly of a Jtable with a list of files in it, one file per row. I wanted to be able to open files in the JTable using drag and drop, so Ive created a subclass of DropTarget and set it for my fr