zoukankan      html  css  js  c++  java
  • 更新数据的脚本

    --UPDATE dbo.Notice WITH(ROWLOCK) SET IsNoAOG=0,IsSection35=0 WHERE IsNoAOG IS NULL AND IsSection35 IS NULL

    DECLARE @Rows INT = 50000

    WHILE 1=1 BEGIN    UPDATE TOP (@Rows) dbo.Notice WITH (ROWLOCK)   SET IsNoAOG=0,IsSection35=0   FROM dbo.Notice n   WHERE IsNoAOG IS NULL AND IsSection35 IS NULL    IF @@RowCount < @Rows   BREAK END

    --==================================

    DECLARE @Rows INT = 50000

    WHILE 1=1 BEGIN  ;WITH Part1 AS (   SELECT DISTINCT NotIntNo FROM dbo.Charge c WITH (NOLOCK) WHERE ChgNoAOG = 'Y' AND ChargeStatus < 900  )  UPDATE TOP (@Rows) dbo.Notice WITH (ROWLOCK)   SET IsNoAOG = 1   FROM dbo.Notice n   WHERE ISNULL(IsNoAOG, 0) = 0    AND NoticeStatus < 900    AND EXISTS (     SELECT 1 FROM Part1 p WITH (NOLOCK) WHERE p.NotIntNo = n.NotIntNo    )    IF @@RowCount < @Rows   BREAK END

  • 相关阅读:
    AcRxClass::addX
    string.format("%s",name)
    strcmp 与 _tcscmp
    acedinitget
    判断实体的类型 相关操作
    accmcolor
    CAD类型转换
    图的存储结构及遍历
    并查集(Union/Find)
    设计模式--缺醒适配器模式
  • 原文地址:https://www.cnblogs.com/sxjljj/p/8527189.html
Copyright © 2011-2022 走看看