• Excel中导入到oracle使用merge into 差异性更新数据库


    merge into temp1 a
    using (select ID
             from (Select ID
                     from temp1
                    where ID = 'SYSTEM00000100000010846'
                   union all
                   select null ID from dual)
            where rownum = 1) b
    On (b.ID = a.ID)
    when matched then
      update
         set REPORT_DATE     = to_date('2014/5/22 0:00:00',
                                       'yyyy-mm-dd hh24:mi:ss'),
             REPORT_SUP_ID   = 'GY20T0000201000015754595',
             REPORT_SUP_NAME = '北京军区太原药材供应站2',
             VOUCHER         = '',
             DIGEST          = '本日10846',
             BORROW_VALUE    = 1000,
             LOAN_VALUE      = -1,
             DIRECTION       = '借',
             BALANCE         = 2990
    when not matched then
      insert
        (ID,
         REPORT_DATE,
         REPORT_SUP_ID,
         REPORT_SUP_NAME,
         VOUCHER,
         DIGEST,
         BORROW_VALUE,
         LOAN_VALUE,
         DIRECTION,
         BALANCE)
      values
        ('SYSTEM00000100000010846',
         to_date('2014/5/22 0:00:00', 'yyyy-mm-dd hh24:mi:ss'),
         'GY20T0000201000015754595',
         '北京军区太原药材供应站2',
         '',
         '本日10846',
         1000,
         -1,
         '借',
         2990)

  • 相关阅读:
    时间选择器组件之table避坑指南
    ⼯⼚模式
    外观模式
    中介者模式+装饰器模式
    代理模式
    策略模式
    设计模式--------单例模式
    设计模式--------订阅/发布模式 (观察者)
    对ts的研究
    对react的研究20200724
  • 原文地址:https://www.cnblogs.com/haofaner/p/3770064.html
Copyright © 2020-2023  润新知