First, if you are using Oracle 8i then it's much EZer to use EXCEUTE IMMEDIATE instead of DBMS_SQL. Look in Oracle doc's for that.