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

相关文章:

  • 2022-12-23
  • 2021-06-04
  • 2022-12-23
  • 2022-12-23
  • 2021-10-13
  • 2021-09-17
猜你喜欢
  • 2021-09-24
  • 2022-12-23
  • 2022-01-13
  • 2022-12-23
  • 2021-06-19
  • 2021-08-10
  • 2021-08-06
相关资源
相似解决方案