update tbl_CDR_Stocking set stockingStatus = , lastUpdatedBy = , lastUpdated = where ownerId = and ownerType = and stockingId = and skuId = and stockingStatus <> insert into tbl_CDR_Stocking ( ownerId, ownerType, cdr_recordId, skuId, stockingStatus, lastUpdated, lastUpdatedBy ) values ( , , , , , , ) SELECT * FROM #_CustomerSkuTable# WHERE ownerId = AND FSL_TableCode = AND customerId = AND mfrId = ORDER BY skuid SELECT skuid, sku FROM tbl_Prd_Skus WHERE ownerId = AND FSL_TableCode = AND skuId IN () ORDER BY skuid ---> insert into #_CustomerSkuTable# ( ownerId, FSL_TableCode, sku, LinkType, customerId, customerType, customerSku, mfrId, skuId ) values ( , , , 'SKU', , , , , ) UPDATE CS SET customerSku = FROM #_CustomerSkuTable# CS WHERE ownerId = AND FSL_TableCode = AND customerId = AND customerType = AND skuId = AND mfrId = Time: #NumberFormat(_ElaspedTime,",9.99")#
Update Count: #_updateCnt#
Insert Count: #_insertCnt#