日期:2014-05-17 浏览次数:20838 次
1. 创建表 A create table 'smart_deal_'||to_char(sysdate,'yyyymmdd') as select * from yourtbl where 1=1; B create table 'smart_deal_'||to_char(sysdate,'yyyymmdd') as select * from yourtable where 1<>1 insert into 'smart_deal_'||to_char(sysdate,'yyyymmdd') select * from yourlianheTblName where 1=1 ; 2. 创建JOB sys.dbms_job.submit(job => :job, what => 'youprocedurename;', next_date => to_date('15-02-2012 08:32:00', 'dd-mm-yyyy hh24:mi:ss'), interval => 'sysdate+30'); commit;
------解决方案--------------------
--存储过程没写全
CREATE OR REPLACE PROCEDURE P_ZC1
AS
BEGIN
create table XX as select * from 已知表结构表名 where 1<>1;
COMMIT;
insert into XX values(取来的数据);
COMMIT;
END P_ZC1;
--- job
begin
sys.dbms_job.submit(job => :job,
what => 'PP_ZC1',
interval => 'trunc(sysdate)+30');
commit;
end;