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

Home -> Community -> Usenet -> c.d.o.tools -> how to write table changes in a log file

how to write table changes in a log file

From: Maggie <maggiezhou_at_hotmail.com>
Date: 2000/06/30
Message-ID: <8jiip3$55m$1@web1.cup.hp.com>#1/1

I would like to capture in a text log file for how many rows are affected after each call is made in the procedure. so, how many rows were inserted, deleted, etc.

For example, here is a procedure, I don't know proper plsql statement I can use in PLSQL to catch these affected rows.

Procedure CTN ( v_vMinDate IN VARCHAR2, v_vMaxDate IN VARCHAR2,v_nDateMonth IN NUMBER) IS v_dMinDate DATE := TO_DATE(v_vMinDate,'MM/DD/YY'); v_dMaxDate DATE := TO_DATE(v_vMaxDate,'MM/DD/YY');

BEGIN DELETE from hpo_cm_ctn_trans_temp;
commit;

INSERT INTO hpo_cm_ctn_trans_temp
(

SELECT ctn.seq_pk,
       ctn.source_site_cd,
       ctn.product_line,
       ctn.reference_dt,
       mapi.cm_transaction_code

FROM ctn,mapi
WHERE ctn.trans_date >= v_dMinDate
  and ctn.trans_date <  v_dMaxDate
  and ctn.debit_acc = mapi.debit_acct
  and ctn.location_cd = mapi.location_code
  and ctn.trans_code = mapi.cm_transaction_code);
commit;

END; Received on Fri Jun 30 2000 - 00:00:00 CDT

Original text of this message

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