Preview Mode

Apply Mode

select GTIN, cleanItemCode, skuId, sku, skuDesc, claimId from qmd_mapping where skuId > 0 select distinct epod.claimId from tbl_TPM_ProofOfDelivery epod with (nolock) inner join tbl_TPM_Claims c with (nolock) on c.ownerId = epod.ownerId and c.ownerType = epod.ownerType and c.claimId = epod.claimId where epod.ownerId = 288 and epod.ownerType = 'MFR' and epod.itemCode = and epod.skuId is null update tbl_TPM_ProofOfDelivery set skuId = where ownerId = 288 and ownerType = 'MFR' and claimId in ( ) and itemCode = and skuId is null select c.claimId, c.readyToAudit, c.readyTOClear, c.claimStatus from tbl_TPM_Claims c with (nolock) where c.ownerId = 288 and c.ownerType = 'MFR' and not exists ( select * from tbl_TPM_ProofOfDelivery epod where epod.ownerId = c.ownerId and epod.ownerType = c.ownerType and epod.claimId = c.claimId and epod.skuId is null ) and c.claimId in ( ) select * from qmd_mapping where skuId = 0