That's a requirement or an imposed solution?
Sounds like whoever imposed the solution should be helping you with this!
I guess you will have to construct ALL your SQL from the date, including CREATE TRIGGER etc etc. This is not a good solution.
BTW - my appologies for mis-reading your original post - I now realise that the external table has fixed name and the internal table name is date dependant. The principle of the code I posted remains the same:Daily structure, 8 mio rows per day - how about partitioning?Code:Declare my_sql varchar2(200); tb_name varchar2(30); Begin Select 'DATA_'||to_char(sysdate,'YYYYMMDD') Into tb_name From dual; my_sql := 'Insert Into '||tb_name||' (Select * From ext_table)' dbms_output.put_line(my_sql); Execute Immediate my_sql; Commit; End;
To be honest (no reflection on you, petzi) this doesn't sound like a problem for an "Oracle newbie".




Reply With Quote