Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> How to update cursor when cursor selects from two tables..

How to update cursor when cursor selects from two tables..

From: Michal Szymanski <dyrex_at_poczta.onet.pl>
Date: 2 Nov 2004 05:56:45 -0800
Message-ID: <a576d821.0411020556.1e2904eb@posting.google.com>


Hi!
I have following situation, I've declared cursor:

 TYPE CONTRACT_REP_SCHEDULE_REC IS RECORD(

    new                  contract.new%TYPE,
    status               repayment_schedule.status%TYPE
 )

 /* Cursor for browsing contract-repayment tables */   CURSOR c_contract_repayment IS
    SELECT c.new,r.status FROM contract c       LEFT OUTER JOIN repayment_schedule r ON c.contract_id = r.contract_id

     WHERE c.NEW = HIB_BOOL_TRUE
       AND c.aggregated = HIB_BOOL_FALSE and
rownum<COMMIT_AFTER_NO_TRAN
       FOR UPDATE;

after I fetch from cursor:

FETCH c_contract_repayment

        INTO contract_repayment_row;

and after I would like to update using:

UPDATE contract

         SET   aggregated = HIB_BOOL_TRUE
       WHERE CURRENT OF c_contract_repayment;
COMMIT; But row is not updated, why? Is it possible to update if cursor select from two or more tables Received on Tue Nov 02 2004 - 07:56:45 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US