Updating a Base Table Block Record

We have a form where there is a multi array base Table block. this is used for generating employee number for various depts. the columns are like this with some sample data
Dept Start No end No Start Date End Date
sales 1001 1100 01-Jun-2009 31-12-2050
Accts 2001 2100 01-Jun-2009 31-12-2050
HR 3001 3100 01-Jun-2009 31-12-2050
and the data is populated from its table. These Data were created at the backend while implementation and is not modified for some long time. Now the client wants to modifiy the data . i.e they want to add new set of Start nos and End nos for the existing Dept So they will add at the bottom of the Block
like this
sales 1101 1200 01-Apr-2011 31-12-2050
when they add this the end date of the existing record should get modified with sysdate as they add the new records. at any time they can add new set of numbers of any number of depts.
can u please guide me how to do this ?

If I understand correctly, you need to take the following data:
Dept  Start No   end No   Start Date   End Date
sales 1001       1100     01-Jun-2009  31-12-2050
Accts 2001       2100     01-Jun-2009  31-12-2050
HR    3001       3100     01-Jun-2009  31-12-2050and change it so it is like this:
Dept  Start No   end No   Start Date    End Date
sales 1101       1200     01-Apr-2011   31-12-2050
when they add this the end date of the existing record should get modified with sysdate as they add the new records.First, I will assume you are using Oracle Forms (since your question was in the Forms forum) but you didn't specify a version. In Forms, you could easily put this logic in the Block Pre-Inser t Trigger. You'll have to set the SYSDATE through DML rather then requery the block after changes are saved. This is easier than trying to find the existing record in the block and setting the SYSDATE.
at any time they can add new set of numbers of any number of depts.Is this data used for anything more than just reference? If so, what is the key value and how does making changes like this affect the existing data and relationships?
Just from the small description you gave, the process sounds very closed - meaning it is not easily changed. If this is true, than you probably need more than just "Use a Pre-Ins Trigger" answer. You also need to know how to update all of the related records that just changed because of the new department number and for this answer we'll need more information. ;)
Craig...

Similar Messages

  • Assigning a Value to a Base Table BLock Field

    hi,
    I have a form in which a block is a base table block . i need to change the value of a field. currently it shows the value of a field from the Table on which the block is based . I need to change the value of that field to display some other value of another table.
    i have a written select statement like this
    select name into vname from ws_emp where ecode = 101
    then i have assigned to this base table field
    :bt_person.ti_v_name := vname;
    this i have created in the base table blocks Post query
    but it is not assigning value
    pls correct me and suggest me if there is any other better method to do this
    Sarav

    That SHOULD work in the Post-Query trigger of the block, but doing that is never a good idea. By replacing a base-table field with any value, it causes Forms automatic processing to lock the row immediately, so no other person running your form can call up the same data. And it causes Forms to think you need to update the record, so the record's status is changed to 'CHANGED' from 'QUERY'.
    It would be better to create a non-base-table field in the block, and put the name into that field.

  • Non DB item in a base table block, gives frm-40202 error.

    Dear All,
    We are using forms6i as a front end. To simulate the error, consider the following example.
    1.Create a multirecord emp block.
    2.Add a non database item in the base table block.
    3.Assign any value to the non database item, in the when new record instance trigger.
    4.When i say F7 or F8, my block asking me like, field must be entered. Which means, my record status changed to Insert. But there is no change in base table record, since i modified only in the non base table item.
    Please validate, whether i am doing anything wrong in my technique.
    Regards,
    Balaji

    If you have a value to be used as the default value then you can use "Initial Value" property in the item level for the Non Database Item. If you do this it wont give you any problem during the query. If you create a new record then the value which you have put as the default will come automatically.

  • API to update oracle base table in oracle apps

    Hi,
    What is the API used to update a base table in oracle contracts?
    Please suggest.

    If you are on 11i, please check irep.oracle.com
    It lists all APIs available.
    IREP - Oracle Integration Repository: The Tool To Find Which API Is Supported and How To Use It ... (Doc ID 554986.1)
    For R12, see
    Oracle Integration Repository Documentation Resources Release 12 (Doc ID 396116.1)
    Note: 462586.1 - Where are the Oracle® Release 12 (R12) API Reference Guide?
    https://metalink.oracle.com/metalink/plsql/ml2_documents.showDocument?p_database_id=NOT&p_id=462586.1
    Note: 458225.1 - Release 12 Integration Repository
    https://metalink.oracle.com/metalink/plsql/ml2_documents.showDocument?p_database_id=NOT&p_id=458225.1
    Hope this helps,
    Sandeep Gandhi

  • Updating a Base Table through a View having UNPIVOT function.

    Hi,
    I have a requirement of updating a Base Table through a View.
    This View has the query using a UNPIVOT function for displaying the columns of the Base tables in rows.
    I need to update/insert into/delete the Base Table by accessing the View (The user doesn't have an access to the Base Table, hence the DML's on the View).
    Following is the table I've created:-
    CREATE TABLE PERSON_DETAILS
      PID            VARCHAR2(10 BYTE),
      FIRSTNAME      VARCHAR2(1000 BYTE),
      LASTNAME       VARCHAR2(1000 BYTE),
      PHONENUMBER    VARCHAR2(1000 BYTE),
      ADDRESS1       VARCHAR2(1000 BYTE),
      ADDRESS2       VARCHAR2(1000 BYTE),
      COUNTRY_CODE   VARCHAR2(1000 BYTE),
      LANGUAGE_CODE  VARCHAR2(1000 BYTE),
      EMAIL          VARCHAR2(1000 BYTE)
    )The sample values are inserted in this table through the below script:-
    insert into person_details values ('1','XYZ','ABC','1234567890','India','Asia','IN','EN','[email protected]');
    insert into person_details values ('2','XYZ2','ABC2','1234567890','India','Asia','IN','EN','[email protected]');The code for the view is as below:-
    CREATE OR REPLACE FORCE VIEW PERSON_DETAILS_VIEW
       PID,
       CD_NAME,
       CD_VALUE
    AS
       SELECT "PID", "CD_NAME", "CD_VALUE"
         FROM person_details UNPIVOT INCLUDE NULLS (cd_value
                             FOR cd_name
                             IN  (firstname AS 'First Name',
                                 lastname AS 'Last Name',
                                 phonenumber AS 'Phonenumber',
                                 address1 AS 'address1',
                                 address2 AS 'address2',
                                 country_code AS 'Country Code',
                                 language_code AS 'Language Code',
                                 email AS 'Email') );Below are the values from the view:-
    PID CD_NAME         CD_VALUE
    1    First Name       XYZ
    1    Last Name       ABC
    1    Phonenumber  1234567890
    1    address1         India
    1    address2         Asia
    1    Country Code   IN
    1    Language Code EN
    1    Email               [email protected]
    2    First Name       XYZ2
    2    Last Name       ABC2
    2    Phonenumber  1234567890
    2    address1         India
    2    address2         Asia 
    2    Country Code   IN
    2    Language Code EN
    2    Email               [email protected] user would fire some statement like below:-
    update person_details_view
    set cd_value = 'US' where CD_NAME = 'IN'The above statement should update the base table PERSON_DETAILS.
    I understand I can write an INSTEAD OF trigger but I do not know what logic to write in the trigger so that the requirement gets fulfilled.
    My Oracle Version
    Oracle Database 11g Enterprise Edition Release 11.1.0.7.0 - 64bit Production
    PL/SQL Release 11.1.0.7.0 - Production
    CORE    11.1.0.7.0    Production
    TNS for Solaris: Version 11.1.0.7.0 - Production
    NLSRTL Version 11.1.0.7.0 - ProductionAny help would be highly appreciated.
    Thank You,
    Ankit Khare.
    Edited by: Ankit_Khare84 on Jun 28, 2012 2:47 PM

    it is definitively possible with an instead of trigger.
    for Example:
    create or replace
    TRIGGER ioft_person
    INSTEAD OF UPDATE
    ON person_details_view
    FOR EACH ROW
    declare
    firstname1  person_details.firstname%type;
    BEGIN
                  SELECT firstname_new into firstname1
                  FROM   (SELECT pid, cd_name, cd_value
                          FROM  
                                  select * from person_details_view where (pid, cd_name) not in (select :new.pid, :new.cd_name from dual)
                                  union all
                                  select :new.pid, :new.cd_name, :new.cd_value from dual
                  PIVOT  ( max(cd_value) AS new FOR (cd_name) IN
                                                          ('First Name' AS firstname,
                                                            'Last Name' as lastname,
                                                            'Phonenumber' as phonenumber,
                                                            'address1' as address1,
                                                            'address2' AS address2,
                                                            'Country Code' as country_code,
                                                            'Language Code' as language_code,
                                                            'Email' as email
                  )  where pid = :old.pid;
      UPDATE person_details
      SET firstname = firstname1
      WHERE pid = :old.pid;
    END ioft_role_perm;and than run
    update person_details_view
    set cd_value = 'X|X' where cd_name = 'First Name' and pid=1The logic is: you must convert back the view through pivoting

  • Update the base table

    Hi experts help me,
    I have one requirment
    there have two machine(plant) fert1,fert2 each one have some materilas.
    from one of the plant  will be goining to stop(fert1).
    than we need featch the issued material from fert1 in reverse  order to store it than post the meterial into fert2 based on the production number.
    Please help me,
    THANKS advance
    Moderator message: "spec dumping", please work yourself first on your requirement.
    Edited by: Thomas Zloch on Oct 29, 2010 1:54 PM

    Hi,
    I'm not sure what you're asking in either question. It would help if you gave a specific example of what you want to do.
    SowmyRaj wrote:
    Hi Experts , I need help in two qurstions
    1. How to update a view without modifying the base table ?You can't.
    Views don't contain any data; they just query base tables.
    You can change the definition of a view (CREATE OR REPLACE VIEW ...) so that it appears that the base table(s) have changed; that won't change the base tables.
    2. How to write a file unix operating system in pl/sql ? is there any built in procedure is there ?The package utl_file has routines for working with files.

  • No base table multi record block...updation

    hello all,
    i have a multi record block with two fields order & datetime to capture the time of the order. but this block is not based on any table. and i want to update another table with the datetime based on the order captured.
    how to do that...? there may be n number of records coming into the block at a time.
    thx in adv.
    Kris

    the best way is make it as a database block .and palace your insert statement in pre-insert trigger when you are inserting the record and place your update trigger in pre-update trigger u can also place your insert and update statement in back end, "i prefer the backend triggers").I think this is the best way because if you are using the go_block and next_record, that may take lots of time time to traverse record by record.
    regards
    mathew

  • Updating data base tables

    Hi all,
       Iam updating database tables using below statement .
       INSERT data_base_table FROM workarea.
    This is working but but looking for better method other than this. Ple let me know if u have any.
    Regards,
    Shiva

    Mass update of all records form an internal table
    INSERT data_base_table FROM TABLE internal_table
    or
    MODIFY data_base_table FROM TABLE internal_table.  "If an existing match exists, it will update it, if not, creates a new record.
    Regards,
    ravi

  • How to update base view Block

    Hi,
    I have a View ( is based on more than one table) and created base table block based on that view.
    Question is, how can I update and save the data from Oracle forms ?
    I'm using Oracle forms 4.5 and Oracle8.0.6 database.
    Thanks in advance.

    Hi James
    Form based on Complex views:
    Records can be updated by writing the code in ON-UPDATE Trigger,
    Code for Inserting a record can be written in ON-INSERT trigger
    For delete u can write the code in ON-DELETE or KEY-DELREC (this worked for my form)
    Locking the rows can be done by ON-LOCK trigger.
    Here is the sample code....
    try to write a package and in that package write procedure for, insert, update, delete, lock, Call those procedures in your trigger which should be on your block level. Block's property that you have to set is: go to the property pallette:
    LOCKING MODE: IMMIDIATE
    KEY MODE: UPDATEABLE
    CODE FOR INSERT:
    --change field names according to your field names
    Package Spec:
    PACKAGE XXCPCRQM_PKG IS
    PROCEDURE insert_row;
    PROCEDURE update_row;
    PROCEDURE delete_row;
    PROCEDURE lock_row;
    END;
    Package Body:
    PACKAGE BODY XXCPCRQM_PKG IS
    --Procedure to Update Row into cpt_ar_charge_to_master table
    PROCEDURE update_row IS
    BEGIN
    UPDATE cpt.cpt_ar_charge_to_master
    SET
    ACCOUNT = :XXCPCRQM_BLK.ACCOUNT,
    SUFFIX = :XXCPCRQM_BLK.SUFFIX,
    REPORT_CODE = :XXCPCRQM_BLK.REPORT_CODE,
    CHARGE_TO_ACCOUNT = :XXCPCRQM_BLK.CHARGE_TO_ACCOUNT,
    CHARGE_TO_SUFFIX = :XXCPCRQM_BLK.CHARGE_TO_SUFFIX,
    CREATION_DATE = :XXCPCRQM_BLK.CREATION_DATE,
    CREATED_BY = :XXCPCRQM_BLK.CREATED_BY,
    LAST_UPDATE_DATE = :XXCPCRQM_BLK.LAST_UPDATE_DATE,
    LAST_UPDATED_BY = :XXCPCRQM_BLK.LAST_UPDATED_BY
    --WHERE ROWID = :XXCPCRQM_BLK.ROW_ID;
    WHERE CHARGE_TO_ID = :XXCPCRQM_BLK.CHARGE_TO_ID;
    EXCEPTION
    when NO_DATA_FOUND
    then
              fnd_message.debug('CAN NOT UPDATE RECORD');
    raise form_trigger_failure;
    commit;
    END;
    --Procedure to Insert Row into cpt_ar_charge_to_master table
    PROCEDURE insert_row IS
    BEGIN
    INSERT INTO cpt.cpt_ar_charge_to_master
    (CHARGE_TO_ID,
    ACCOUNT,
    SUFFIX,
    REPORT_CODE,
    CHARGE_TO_ACCOUNT,
    CHARGE_TO_SUFFIX,
    CREATION_DATE,
    CREATED_BY,
    LAST_UPDATE_DATE,
    LAST_UPDATED_BY)
    VALUES
    (cpt_chrg_to_id_s.nextval, -- Sequence
    :XXCPCRQM_BLK.ACCOUNT,
    :XXCPCRQM_BLK.SUFFIX,
    :XXCPCRQM_BLK.REPORT_CODE,
    :XXCPCRQM_BLK.CHARGE_TO_ACCOUNT,
    :XXCPCRQM_BLK.CHARGE_TO_SUFFIX,
    :XXCPCRQM_BLK.CREATION_DATE,
    :XXCPCRQM_BLK.CREATED_BY,
    :XXCPCRQM_BLK.LAST_UPDATE_DATE,
    :XXCPCRQM_BLK.LAST_UPDATED_BY);
    EXCEPTION
    when NO_DATA_FOUND
    then
              fnd_message.debug('CAN NOT INSERT RECORD');
    raise form_trigger_failure;
    commit;
    END;
    --Procedure to Delete rows from cpt_ar_charge_to_master
    PROCEDURE delete_row IS
    BEGIN
    DELETE FROM cpt.cpt_ar_charge_to_master
    WHERE charge_to_id = :XXCPCRQM_BLK.charge_to_id;
    EXCEPTION
    when NO_DATA_FOUND
    then
              fnd_message.debug('CAN NOT DELETE RECORD');
              raise form_trigger_failure;
    commit;
    END;
    PROCEDURE lock_row IS
    Counter NUMBER;
    CURSOR C IS
    SELECT
    CHARGE_TO_ID,
    ACCOUNT,
    SUFFIX,
    REPORT_CODE,
    CHARGE_TO_ACCOUNT,
    CHARGE_TO_SUFFIX
    FROM cpt_ar_charge_to_master
    WHERE charge_to_id = :XXCPCRQM_BLK.CHARGE_TO_ID
    FOR UPDATE of CHARGE_TO_ID NOWAIT;
    Recinfo C%ROWTYPE;
    BEGIN
    Counter := 0;
    LOOP
    BEGIN
    Counter := Counter + 1;
    OPEN C;
    FETCH C INTO Recinfo;
    if (C%NOTFOUND) then
    CLOSE C;
    FND_MESSAGE.Set_Name('FND','FORM_RECORD_DELETED');
    FND_MESSAGE.Error;
    Raise FORM_TRIGGER_FAILURE;
    end if;
    CLOSE C;
    if (
    (Recinfo. CHARGE_TO_ID = :XXCPCRQM_BLK.CHARGE_TO_ID)
    AND ( (Recinfo. ACCOUNT = :XXCPCRQM_BLK.ACCOUNT)
    OR ( (Recinfo. ACCOUNT IS NULL)
    AND (:XXCPCRQM_BLK.ACCOUNT IS NULL)))
    AND ( (Recinfo.SUFFIX= :XXCPCRQM_BLK.SUFFIX)
    OR ( (Recinfo.SUFFIX IS NULL)
    AND (:XXCPCRQM_BLK.SUFFIX IS NULL)))
    AND ( (Recinfo.REPORT_CODE = :XXCPCRQM_BLK.REPORT_CODE)
    OR ( (Recinfo.REPORT_CODE IS NULL)
    AND (:XXCPCRQM_BLK.REPORT_CODE IS NULL)))
    AND ( (Recinfo.CHARGE_TO_ACCOUNT = :XXCPCRQM_BLK.CHARGE_TO_ACCOUNT)
    OR ( (Recinfo.CHARGE_TO_ACCOUNT IS NULL)
    AND (:XXCPCRQM_BLK.CHARGE_TO_ACCOUNT IS NULL)))
    AND ( (Recinfo.CHARGE_TO_SUFFIX = :XXCPCRQM_BLK.CHARGE_TO_SUFFIX)
    OR ( (Recinfo.CHARGE_TO_SUFFIX IS NULL)
    AND (:XXCPCRQM_BLK.CHARGE_TO_SUFFIX IS NULL)))
    ) then
    return;
    else
    FND_MESSAGE.Set_Name('FND','FORM_RECORD_CHANGED');
    FND_MESSAGE.Error;
    Raise FORM_TRIGGER_FAILURE;
    end if;
    EXCEPTION
    When APP_EXCEPTIONS.RECORD_LOCK_EXCEPTION then
    IF (C% ISOPEN) THEN
    close C;
    END IF;
    APP_EXCEPTION.Record_Lock_Error(Counter);
    END;
    end LOOP;
    END lock_row;
    END XXCPCRQM_PKG;
    CALLING FROM TRIGGER:
    ON-INSERT: XXCPCRQM_PKG.insert_row;
    I am sure this will help you.
    Thanks
    Madhu

  • Updating a DB table by a BDC session in background

    Hi,
    I need to  update a DB table with records using a BDC session. I need to run this session in background. But the Error Log I'm getting suggests that Table Maintenance is required for the same.
    Note that I can very well insert records in this table thru se11 and also by running the session in foreground.
    Is there any work-around for this issue?
    Thanks.

    Hi
    If at all you are using any DOWNLOAD and UPLOAD related function modules you can't run the BDC program in the background.
    If it is a Z table update you can create the table maintenance generator.
    other wise you can do it.
    You can run session in background.
    Reward points if useful
    Regards
    Anji

  • Non-base tables

    What is non-base table when refered in forms ?
    null

    moorthy kathirava (guest) wrote:
    : What is non-base table when refered in forms ?
    When you create a Block/form without any base table, ie., Form
    containing controls which are not necessarily related to one
    table is called non base table block/form.
    Murugan
    null

  • Order by on Non-base table Item

    Hi,
    I have a base table block on Dept and some of the non-base table items(which are emp table and being populated through post-query).
    So, i have some base table items and non-base table items on the same block.
    No my problem is, i have to do ORDER BY on one of non-base table items..
    How can i do this ?
    Thanks in advance.

    The obvious answer is to create a view upon which to base the block, or alternatively you could use a FROM Clause Query so that you don't have to set the values in your POST-QUERY trigger.
    Richard

  • How to display records from base table as well as some other table?

    Hello expert,
    I have a requirement to develope a form described below:
    One control block and database block.
    DB block  is based on table T1 (USER, Table_name, Column_name, ACCESS);
    In control block, there are three fields,
    User, Table user will enter , and DB block will query based on control block fields(user, table_name).
    In table it is not necessary that all the columns of any table will be given.
    suppose there is a Table X consist of 10 column.
    Initially user give access for all the 10 columns through this form.
    if we query for user , table, all the record will come from table T1.
    now consider the case, when access given to table X number of columns were 10. after that 2 new columns added later.
    now there is no info of added column in table T1. i want if user query DB block, these newly added column must display in DB Block.
    Please help me out.
    Thanks
    Dhirender

    >i want if user query DB block, these newly added column must display in DB Block.
    You need to modify your form and add the two columns as base table items. Forms does not add two base table items by itself.

  • Data from 2 database blocks insert into the same base table?

    Hello,
    I have canvas C_NEW. On this canvas, items from 3 blocks are usable by the user.
    1. Block NEW_HEAD: 3 items say X1,X2,X3
    2. Block NEW : multi record text fields say Y1 thru Y10. Also a scrollbar.
    3. Block NEW_ACTION: 6 buttons say B1 thru B6 (One of them is N_OK which is the item in question)
    both the blocks NEW, NEW_HEAD are db blocks and have the same base table say BT. When the users click on the N_OK (after filling out the data in the NEW_HEAD block and then NEW in that order) I need the data from both the NEW, NEW_HEAD to go into the BT. Currently only the data from the NEW is going into BT. Fields in the BT table which correspond to the fields X1,X2,X3 in the NEW_HEAD remain null after clicking the N_OK button. I put commit_form in the N_OK code since both the blocks are db blocks( and as suggested by folks, it is easier to issue a commit_form than do a lot more work in writing my own SQL).
    How can I achive this?
    Thanks,
    Chiru

    I tried doing what you suggested by putting the following code in the program unit which gets called when_button_pressed.
    PROCEDURE P_SAVE IS
    v_lc_no number;
    v_lc_seq number;
    v_dmg_allow number;
    BEGIN
      Go_Block('B_new_head');
      v_lc_no:= :B_new_head.N_LC_NO;
      v_lc_seq:= :B_new_head.N_LC_SEQ;
      v_dmg_allow:= :B_new_head.N_LC_DMG_ALLOW;
      Go_Block('B_new');      
    FIRST_RECORD;
    LOOP     
         emessage('before insert'||v_lc_no||'-'||v_lc_seq||'-'||:B_new.order_no);
      INSERT INTO ct_lc_import(
        LC_NUMBER,
        LC_SEQ,
        DAMAGE_ALLOWANCE,
        ORDER_NO,
        QTY_SHIPPED,
        UNIT_PRICE,
        DRAFT_AMOUNT,
        TICKET_DEDUCTION,
        SHIPMENT_PENALTY,
        TOTAL_DEBIT,
        DEBIT_DATE)
        VALUES (v_lc_no,
                v_lc_seq,
                v_dmg_allow,
                :B_new.order_no,
                :B_new.qty_shipped,
                :B_new.unit_price,
                :B_new.draft_amount,
                :B_new.ticket_deduction,
                :B_new.shipment_penalty,
                :B_new.total_debit,
                :B_new.debit_date);
       commit;
      NEXT_RECORD;
       if :SYSTEM.LAST_RECORD='TRUE' then
             emessage('last record');
             EXIT;
       end if;
      --NEXT_RECORD;
    END LOOP;
    EXCEPTION
       when FORM_TRIGGER_FAILURE then
          raise;
       when OTHERS then
          emessage(SQLERRM);
          raise FORM_TRIGGER_FAILURE;
    END;But I can't see the records in the table eventhough the message pops up with the values before inserting the 1st record. It then exits. I would think it would atleast insert the very first record into the the table at the least.
    Thanks,
    Chiru

  • Reg update of a 10 million record table from 1 million record table

    I have 2 tables
    Tabke 1 : 10 millio records
    21 indexes --> 1). acct_id , acct_seq_no -- index_1
    2). c1 , c2 , c3 -- index_2
    Table 2 : 1 .5 million records
    1 index on ( acct_id, acct_seq_no) - idx_1
    common keys are acct_id and acct_seq_no
    I'm updating table1 from table 2
    I need to use index ( index_1 from table_1 ) and (idx_1 from table_2)
    How can I make my query to use only this particular index.
    MY query ia as follows
    UPDATE csban_&1 csb
    SET (
    duns_no,
    hdqtrs_duns_no,
    us_ultmt_duns_no,
    sci_id,
    blg_cl_id,
    cl_id
    ) =
    ( SELECT acct_id,
    acct_seq_no,
    duns_no,
    hdqtrs_duns_no,
    us_ultmt_duns_no,
    sci_id,
    blg_cl_id,
    cl_id
    FROM csban_abi_temp
    WHERE csb.acct_id = temp.acct_id
    AND csb.acct_seq_no = temp.acct_seq_no
    AND rownum < 2
    WHERE
    EXISTS
    SELECT 1
    FROM csban_abi_temp temp1
    WHERE csb.acct_id = temp1.acct_id
    AND csb.acct_seq_no = temp1.acct_seq_no
    DO I need to put and index hint after this
    UPDATE csban_&1 csb --???????? /*+ indedx (csb.index_1) */
    Thanks in advance

    Thanks a lot david and rob for sharing the info.
    Please find the details
    SQL> EXPLAIN PLAN FOR
    UPDATE csban_2 csb
    SET (
    duns_no,
    hdqtrs_duns_no,
    us_ultmt_duns_no,
    sci_id,
    blg_cl_id,
    cl_id
    ) =
    ( SELECT duns_no,
    hdqtrs_duns_no,
    us_ultmt_duns_no,
    sci_id,
    blg_cl_id,
    cl_id
    FROM csban_abi_temp temp
    WHERE csb.acct_id = temp.acct_id
    AND csb.acct_seq_no = temp.acct_seq_no
    AND rownum < 2
    WHERE
    EXISTS
    SELECT 1
    FROM csban_abi_temp temp1
    WHERE 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
    21 22 23 24 25 26 27 28 29
    Explained.
    SQL>
    SQL>
    SQL> SELECT * FROM TABLE(dbms_xplan.display);
    PLAN_TABLE_OUTPUT
    Plan hash value: 584770029
    | Id | Operation | Name | Rows | Bytes | Cost
    | TQ |IN-OUT| PQ Distrib |
    PLAN_TABLE_OUTPUT
    | 0 | UPDATE STATEMENT | | 530K| 19M| 8213
    | | | |
    | 1 | UPDATE | CSBAN_2 | | |
    | | | |
    |* 2 | FILTER | | | |
    | | | |
    | 3 | PX COORDINATOR | | | |
    | | | |
    PLAN_TABLE_OUTPUT
    | 4 | PX SEND QC (RANDOM) | :TQ10000 | 530K| 19M| 8213
    | Q1,00 | P->S | QC (RAND) |
    | 5 | PX BLOCK ITERATOR | | 530K| 19M| 8213
    | Q1,00 | PCWC | |
    | 6 | TABLE ACCESS FULL | CSBAN_2 | 530K| 19M| 8213
    | Q1,00 | PCWP | |
    |* 7 | INDEX RANGE SCAN | IDX_CSB_ABI_TMP | 1 | 10 | 3
    PLAN_TABLE_OUTPUT
    | | | |
    |* 8 | COUNT STOPKEY | | | |
    | | | |
    | 9 | TABLE ACCESS BY INDEX ROWID| CSBAN_ABI_TEMP | 1 | 38 | 4
    | | | |
    |* 10 | INDEX RANGE SCAN | IDX_CSB_ABI_TMP | 1 | | 3
    | | | |
    PLAN_TABLE_OUTPUT
    Predicate Information (identified by operation id):
    2 - filter( EXISTS (SELECT 0 FROM "CSBAN_ABI_TEMP" "TEMP1" WHERE "TEMP1"."ACC
    T_SEQ_NO"=:B1 AND
    "TEMP1"."ACCT_ID"=:B2))
    PLAN_TABLE_OUTPUT
    7 - access("TEMP1"."ACCT_ID"=:B1 AND "TEMP1"."ACCT_SEQ_NO"=:B2)
    8 - filter(ROWNUM<2)
    10 - access("TEMP"."ACCT_ID"=:B1 AND "TEMP"."ACCT_SEQ_NO"=:B2)
    Note
    - cpu costing is off (consider enabling it)
    30 rows selected.
    The query had completed and it took 1 hr 47 mts.
    SQL> SQL> SQL> Updating CSBAN from TEMP table
    old 1: UPDATE /*+ INDEX(acct_id,acct_seq_no) */ csban_&1 csb
    new 1: UPDATE /*+ INDEX(acct_id,acct_seq_no) */ csban_1 csb
    1611807 rows updated.
    Elapsed: 01:47:16.40

Maybe you are looking for

  • Workflow and WD integration

    Hi, We are implementing Workflow and Webdynpro ABAP integration.Employee submits competences from portal, this triggers an approval task to the manager .Manager will approve the task from worklist and when he clicks on task, Web dynpro application op

  • CLASSPATH / Project organisation

    Hi, I'm fairly new to Java, but I'd like to think I'm a reasonably experienced programmer. I think I've missed something fundamental with the organisation of Java projects though. I have a lot of toy Java projects, mostly as learning tools, some of t

  • Will Soundlbaster Audigy 2 NX Drivers be updated for EAX

    I am currently playing games such as Everquest 2 that support EAX4 and the Devs there said you guys need to update the drivers for this card to support EAX4. Is this in the works, if not why not, if so when? Thanks in advance....

  • Include XSQL page into UIX page

    Hello, I am trying to build a page in UIX and then include an XSQL page into the <contents> region of the <pagelayout>. Does anyone know if this is possible? And if yes, if this should work agains OC4J and/or Apache/Jserv? I tried including the page

  • Materials Management view on company code

    Hello MM Gurus,         My requirement is as follows.         When we go to next month (May 2007), the system should allow me to post for the months of March 2007(12 th period of 2006), April 2007 (I st period of 2007) and May 2007(II nd period of 20