• INSERT into ... on duplicate key update ...


    INSERT  into exception_report_total (
             waitFillOrders
            ,waitSendOrders
            ,changeOrders
            ,changeTotal
            ,waitProduceOrders
            ,wmsStockOrders
            ,erpStockOrders
            ,waitReserveOrders
            ,waitDispatchOrders
            ,addDispatchOrders
            ,waitCancel
            ,sendExceptions
            ,reserveOrders
            ,create_time
            ,carrier_id
            ,carrier_name
            ,dc_id
            ,dc_name
            ,org_id
            ,org_name
            )
            values
            <foreach collection="list" item="item" index="index" separator="," >
                (
                #{item.waitFillOrders}
                ,#{item.waitSendOrders}
                ,#{item.changeOrders}
                ,#{item.changeTotal}
                ,#{item.waitProduceOrders}
                ,#{item.wmsStockOrders}
                ,#{item.erpStockOrders}
                ,#{item.waitReserveOrders}
                ,#{item.waitDispatchOrders}
                ,#{item.addDispatchOrders}
                ,#{item.waitCancel}
                ,#{item.sendExceptions}
                ,#{item.reserveOrders}
                 ,now()
                ,#{item.carrier_id}
                ,#{item.carrier_name}
                ,#{item.dc_id}
                ,#{item.dc_name}
                ,#{item.org_id}
                ,#{item.org_name}
                )
            </foreach>
            on duplicate key update
            waitFillOrders = values(waitFillOrders),
            waitSendOrders = values(waitSendOrders),
            changeOrders = values(changeOrders),
            changeTotal = values(changeTotal),
            waitProduceOrders = values(waitProduceOrders),
            wmsStockOrders = values(wmsStockOrders),
            erpStockOrders = values(erpStockOrders),
            waitReserveOrders = values(waitReserveOrders),
            waitDispatchOrders = values(waitDispatchOrders),
            addDispatchOrders = values(addDispatchOrders),
            waitCancel = values(waitCancel),
            sendExceptions = values(sendExceptions),
            reserveOrders = values(reserveOrders)
  • 相关阅读:
    四川省选2012 day1 喵星球上的点名 (后缀数组,并不是完全的正解)
    6.2.1 最短路
    5.3.3 敌兵布阵
    6.1.1 Constructing Roads
    6.2.4 Arbitrage
    6.1.6 Jungle Roads
    5.3.6 Cow Sorting (HDU 及 POJ)
    6.2.5 Trucking
    6.1.4 还是畅通工程
    6.1.3 畅通工程
  • 原文地址:https://www.cnblogs.com/olmlo/p/5144704.html
Copyright © 2020-2023  润新知