zoukankan      html  css  js  c++  java
  • 需求库规划库储备库四库更新区域类型到meta_localinfo表

    update npas.meta_localinfo a
    set subordinate_area_key=b.subordinate_area_key,subordinate_area=b.subordinate_area
    from
    (
    select p.site_requirement_code,p.subordinate_area_key,s.subordinate_area from npas.de_cover_point p
    left join npas.dim_subarea s on p.subordinate_area_key = s.subordinate_area_key
    where p.subordinate_area_key is not null
    )as b
    where a.site_requirement_code = b.site_requirement_code
    
    and a.subordinate_area_key is null and a.site_planning_id='-1';
    
    
    
    update npas.meta_localinfo a
    set subordinate_area_key=b.subordinate_area_key,subordinate_area=b.subordinate_area
    from 
     (  
     select p.site_planning_id,p.subordinate_area_key,s.subordinate_area from npas.pl_cover_point p
     left join dim_subarea s on p.subordinate_area_key = s.subordinate_area_key
     where p.subordinate_area_key is not null
     )as b
    where a.site_planning_id = b.site_planning_id
    
    and a.subordinate_area_key is null ;
    
    update npas.meta_localinfo a
    set subordinate_area_key=b.subordinate_area_key,subordinate_area=b.subordinate_area
    from
    (
    select p.site_reserve_id,p.subordinate_area_key,s.subordinate_area from npas.re_cover_point p
    left join npas.dim_subarea s on p.subordinate_area_key = s.subordinate_area_key
    where p.subordinate_area_key is not null
    )as b
    where a.site_planning_id = b.site_reserve_id
    
    and a.subordinate_area_key is null ;
    
    
    
    update npas.meta_localinfo a
    set subordinate_area_key=b.subordinate_area_key,subordinate_area=b.subordinate_area
    from
    (
    select p.site_store_id,p.subordinate_area_key,s.subordinate_area from npas.st_cover_point p
    left join npas.dim_subarea s on p.subordinate_area_key = s.subordinate_area_key
    where p.subordinate_area_key is not null
    )as b
    where a.site_planning_id = b.site_store_id
    
    and a.subordinate_area_key is null ;
    ##############阁下如果是抄袭,爬取文章作恶或误导他人的开发者,请阅读中国现行法律的相关处罚条例再动手,转载之前最好先验证#############
  • 相关阅读:
    分类问题的评价指标
    29 畅游 x86 分页机制(中)
    高手进阶,终极内存技术指南——完整/进阶版
    从ST官网获取STM32 AD封装库(包含原理图库和PCB库)详细教程
    标准SPI、DUAL SPI、Quad SPI;NorFlash、NandFlash、eMMC闪存的比较与区别
    ARM 之七 主流编译器(armcc、iar、gcc for arm)详细介绍
    STM32中ARM系列编译工具链的编译宏选择(__CC_ARM、__ICCARM__、__GNUC__、__TASKING__)
    每日总结
    每日总结
    每日总结
  • 原文地址:https://www.cnblogs.com/chuyuan/p/14643272.html
Copyright © 2011-2022 走看看