You need to use dynamic sql to do this - 'execute immediate' or DBMS_SQL woulddo the job.