Hi!
I need to wrap this SQL into SP where I can pass new owner name. I'm planning create db table with all owners I need to pass.
BEGIN
FOR r IN (SELECT table_name FROM dba_tables WHERE owner='TRAIN1')
LOOP
EXECUTE IMMEDIATE 'truncate table TRAIN1.'||r.table_name;
END LOOP;
END;
/
FOR r IN (SELECT table_name FROM dba_tables WHERE owner='TRAIN1')
LOOP
EXECUTE IMMEDIATE 'truncate table TRAIN1.'||r.table_name;
END LOOP;
END;
/
Thanks.
Greg
Do you Yahoo!?
Yahoo! Hotjobs: Enter the "Signing Bonus" Sweepstakes