Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Mailing Lists -> Oracle-L -> Re: PL/SQL question
Manoj
My approach (as i have done in the past on more than one occassions) would be to use a plsql block to generate an SQL script on the fly and run the same from SQL*Plus prompt. I would not be using Dynamic SQL for these one off (i suppose) updates.
HTH GovindanK
> set timing on
> set serverout on size 1000000
> declare
> l_commit_interval number := 5000;
> l_where_clause varchar2(2000);
> l_cnt number := 0;
> l_owner varchar2(25) := 'OWNER1';
> l_index_cnt number := 4;
> type txn_rec_tab_cnt is record
> (
> tab_name varchar2(70),
> tab_aff_rows number(6):= 0
> );
> type t_tab_cnt is table of txn_rec_tab_cnt index by
binary_integer;
> txn_tab_cnt t_tab_cnt;
> cursor c1 is select ref_num from trans where country_code =
'KK';
> cursor c2 is select a.owner||'.'||a.table_name table_name
,b.column_name
> from all_tab_columns a
> ,all_tab_columns b
> where a.column_name = 'CTRY'
> and a.table_name = b.table_name
> and b.column_name in
('REF_NUM','BILL_REF_NUM','FLDR_T2_ID','TXN_REF_NUM')
> and a.owner = l_owner
> and b.owner = l_owner;
>
-- http://www.freelists.org/webpage/oracle-lReceived on Wed Sep 28 2005 - 13:02:15 CDT
![]() |
![]() |