zoukankan      html  css  js  c++  java
  • 插入待兑付清单SQL备份

    -- 插入待兑付清单
    SELECT DISTINCT k1.link_no 
    FROM lk_link_info k1, lk_issue_info k2
    WHERE k1.issue_link_no = k2.issue_link_no
    AND k1.link_status = 2 
    AND TIMESTAMPDIFF(DAY, DATE_FORMAT(NOW(), '%Y-%m-%d'), k2.payoff_date) = '15'
    
    -- 系统定时作废开单并插入到待兑付清单
    SELECT DISTINCT k1.link_no 
    FROM lk_link_info k1, lk_issue_info k2
    WHERE k1.issue_link_no = k2.issue_link_no
    AND k1.link_status != 2 
    AND k1.link_flow_status IN (3,-3,4,-4,5,-5,6,-6,7,-7) 
    AND k1.link_source_type = 'ISSUE' 
    AND TIMESTAMPDIFF(DAY, DATE_FORMAT(NOW(), '%Y-%m-%d'), k2.payoff_date) = '15'
    
    -- 系统定时作废转单并插入到待兑付清单
    SELECT DISTINCT k1.link_no 
    FROM lk_link_info k1, lk_issue_info k2
    WHERE k1.issue_link_no = k2.issue_link_no
    AND k1.link_status != 2
    AND k1.link_flow_status IN (6,-6,7,-7,9,10,-10,11,-11)
    AND (k1.link_source_type = 'TRANSFER' OR k1.link_source_type = 'TRANSFER_RETAIN') 
    AND TIMESTAMPDIFF(DAY, DATE_FORMAT(NOW(), '%Y-%m-%d'), k2.payoff_date) = '15'
  • 相关阅读:
    C语言I—2019秋作业02
    C语言I—2019秋作业01
    C语言I博客作业01
    C语言I博客作业09
    C语言I博客作业08
    C语言I博客作业07
    C语言I博客作业06
    C语言I博客作业05
    C语言I博客作业04
    C语言I博客作业03
  • 原文地址:https://www.cnblogs.com/jun1019/p/15273305.html
Copyright © 2011-2022 走看看