CREATE OR REPLACE PROCEDURE labware_admin.truncate_tables
(
    schema_owner        IN VARCHAR2
)
AS
   r number(10);
BEGIN
FOR r IN (SELECT table_name FROM dba_tables WHERE owner=schema_owner)
  LOOP
    EXECUTE IMMEDIATE 'truncate table schema_owner.'||r.table_name;
  END LOOP;
END; 
 
 
ERROR:  Line 14 Column 55 PLS-00364: loop index variable 'R' use is invalid.
 
 
Any ideas?
 
Thank you!
 
 


Do you Yahoo!?
Yahoo! Hotjobs: Enter the "Signing Bonus" Sweepstakes

Reply via email to