• Delete Exists


    Create PROCEDURE [dbo].[LVS_Update_WaferInfo]
    @LotId varchar(40),
    @xmlData xml
    as
    BEGIN

    delete W from LVS_WaferList W,
    (
    select distinct @LotId LotID,T.C.value ('CURRENTPASS[1]' , 'varchar(max)' ) as CurrentPass
    from @xmlData.nodes ('//dt_result' ) as T(C)
    ) M
    where M.LotID = W.LotID and M.CurrentPass = W.CurrentPass


    insert into LVS_WaferList (LotID,CurrentPass,RingID,WaferFile,WaferLimit,ActionDate)
    select distinct @LotId LotID,T.C.value ('CURRENTPASS[1]' , 'varchar(max)' ) as CurrentPass,
    T.C.value ('RINGID[1]' , 'varchar(max)' ) as RingID,
    T.C.value ('INVENTORISEDWAFERID[1]' , 'varchar(max)' ) as WaferFile,
    T.C.value ('QUANTITY[1]' , 'int' ) as Qty,GETDATE()
    from @xmlData.nodes ('//dt_result' ) as T(C)

    END

  • 相关阅读:
    设计模式-状态模式
    设计模式-策略模式
    Spring MVC 梳理
    Spring MVC 梳理
    设计模式-总结
    Spring boot 梳理
    Spring boot 梳理
    [DP题]最长上升子序列
    NOIP2013 Day1
    20171025日程
  • 原文地址:https://www.cnblogs.com/wonder315/p/4521469.html
Copyright © 2020-2023  润新知