缓慢变化思想5

来源:互联网 发布:辅助软件定制 编辑:程序博客网 时间:2024/06/05 04:09

--key words
  vv_task_pos := 'insert into t_e_fsi_link_mid1 keywords ';
  insert into t_e_fsi_link_mid1
    (customer_id,
     link_type_id,
     biz_org_id,
     fsi_core_product_id,
     status,
     first_active_time,
     has_read_condition,
     link_account_id,
     modify_time,
     version,
     last_change_date,
     fsi_link_pk ,
     customer_status,
     status_change_time
     )
    select mid.customer_id,
           mid.link_type_id,
           mid.biz_org_id,
           mid.fsi_core_product_id,
           mid.status,
           mid.first_active_time,
           mid.has_read_condition,
           mid.link_account_id,
           mid.modify_time,
           mid.version,
           mid.last_change_date,
           mid.fsi_link_pk,
           mid.customer_status,
           mid.status_change_time
      from t_e_fsi_link_mid mid

      left join LBI_EDM_VDF.t_e_fsi_link link_e
        on mid.customer_id = link_e.customer_id
       and mid.biz_org_id = link_e.biz_org_id
       and mid.fsi_core_product_id = link_e.fsi_core_product_id
       and mid.first_active_time = link_e.first_active_time
       and link_e.version = 0
     where nvl(mid.status, 'null') <> nvl(link_e.status, 'null')
        or nvl(mid.customer_status, -1) <> nvl(link_e.customer_status, -1);

  commit;

0 0
原创粉丝点击