oracle任务手动转历史

发布时间:2020-08-03 12:45:50 作者:qvodnet
来源:网络 阅读:149

select to_char( rwfpsj,'yyyy-mm-dd'),rwzt,count(*) from out_sale_task_d0906 t group by rwzt ,to_char( rwfpsj,'yyyy-mm-dd'),rwzt

drop table out_sale_task_d0906
create table out_sale_task_d0906 as
select * from out_sale_task_d t where rwzt='9' and to_char( wfhsqsj,'yyyy-mm-dd')<'2019-09-03'

SELECT * FROM out_sale_task_d AS OF Timestamp(SYSDATE-2/1440) where djbh in (select djbh from out_sale_task_d0906);

insert into out_sale_task_d_hty
select * from out_sale_task_d t where djbh in (select djbh from out_sale_task_d0906);

insert into out_sale_task_m_hty
select * from out_sale_task_m t where djbh in (select djbh from out_sale_task_d0906);

delete out_sale_task_d t where djbh in (select djbh from out_sale_task_d0906);
delete out_sale_task_m t where djbh in (select djbh from out_sale_task_d0906);

insert into out_sale_billing_m_hty
select from out_sale_billing_m t where djbh in (select djbh from out_sale_task_d0906);
insert into out_sale_billing_d_hty
select
from out_sale_billing_d t where djbh in (select djbh from out_sale_task_d0906);

delete out_sale_billing_d where djbh in (select djbh from out_sale_task_d0906);
delete out_sale_billing_m where djbh in (select djbh from out_sale_task_d0906);

insert into out_sale_review_m_hty
select from out_sale_review_m t where djbh in (select djbh from out_sale_task_d0906);
insert into out_sale_review_d_hty
select
from out_sale_review_d t where djbh in (select djbh from out_sale_task_d0906);

delete out_sale_review_d where djbh in (select djbh from out_sale_task_d0906);
delete out_sale_review_m where djbh in (select djbh from out_sale_task_d0906);

select min(OPER_DATE),max(OPER_DATE),count() from Jg_Info
insert into Jg_Info_Hty
select
from JG_INFO where OPER_DATE<to_date('2019-09-1 00:42:03','yyyy-mm-dd hh34:mi:ss');
delete JG_INFO where OPER_DATE<to_date('2019-09-1 00:42:03','yyyy-mm-dd hh34:mi:ss')

推荐阅读:
  1. Oracle 历史SQL执行耗时查询
  2. Oracle12c 手动创建pdb

免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。

oracle acle

上一篇:ADG terminated by LGWR, terminating the instance

下一篇:Python新手教程:办公小能手,使用Python批量修改文件名!

相关阅读

您好,登录后才能下订单哦!

密码登录
登录注册
其他方式登录
点击 登录注册 即表示同意《亿速云用户服务条款》