Here is the SQL:
select 'create table XX_' || replace(replace(trim(table_id),'-','_'),'%','X') || '_LOOKUP as select * from prn_tcodes where trim(table_id) = ''' || trim(table_id) || ''';'
from prn_tcodes
group by table_id;
I want the resulted SQL statements to be executed, is there a way?
I’m using Oracle 10g
Thank you,,,
Spool your above script to a file, then execute that file.