select itemNumber, itemDesc, GTIN, '' skipReason from tbl_IMPORT_KraftAlternateSkus with (nolock) where ownerId = and ownerType = and eai_batchId = order by GTIN select itemNumber, count(*) gtins from qmd_crossRef group by itemNumber having count(*) > 1 select GTIN, count(*) ItemNumbers from qmd_crossRef where gtin != '' group by GTIN having count(*) > 1 select distinct fseSkuId, ItemNumber from qmd_crossRef where fseSkuId > 0 update tbl_PRD_Skus set mfrSKU = , mfrSKUOverride = 'Y' where ownerId= and fsl_tablecode = and skuId =

Set alternate SKU on #lsnumberformat( qmd_found.recordCount )# items.

select GTIN, ItemNumber, ItemDesc, skipReason from qmd_crossRef where skipReason <> '' select distinct GTIN, ItemNumber, ItemDesc from qmd_crossRef where fseSkuId is null and skipReason = '' select distinct epod.claimId, epod.itemCode mfr_item_code, epod.itemDescription, 0 fseSKUId from tbl_TPM_ProofOfDelivery epod with (nolock) left outer join tbl_PRD_Skus s with (nolock) on s.skuId = epod.skuId and s.ownerId = epod.ownerId and s.fsl_tablecode = epod.ownerType where epod.ownerId = and epod.ownerType = and s.skuId is null and exists ( select * from tbl_TPM_Claims c where c.claimId = epod.claimId and c.ownerId = epod.ownerId and c.ownerType = epod.ownerType ) and nullif( epod.itemCode, '' ) is not null order by mfr_item_code update tbl_TPM_ProofOfDelivery set skuId = where ownerId = and ownerType = and itemCode = select skuId, sku from tbl_PRD_Skus with (nolock) where ownerId = and fsl_tablecode = and sku like update tbl_TPM_ProofOfDelivery set skuId = where ownerId = and ownerType = and itemCode = and skuId is null select skuId, sku from tbl_PRD_Skus with (nolock) where ownerId = and fsl_tablecode = and sku like update tbl_TPM_ProofOfDelivery set skuId = where ownerId = and ownerType = and itemCode = and skuId is null

#lsnumberformat( _totalEpodRecordsUpdated )# ePOD Records Updated

update tbl_TPM_ClaimContracts set status = null, statusComment = null where ownerId = and ownerType = and contractNbr = and claimId = update tbl_TPM_ProofOfDelivery set qualifiedAmount = null, qualifiedRate = null, status = null, statusComment = null, modifyDate = , flagged = 'N', perContractVariance = null where ownerId = and ownerType = and contractNbr = and claimId = ---> select distinct epod.claimId, epod.itemCode mfr_item_code, epod.itemDescription from tbl_TPM_ProofOfDelivery epod with (nolock) left outer join tbl_PRD_Skus s with (nolock) on s.skuId = epod.skuId and s.ownerId = epod.ownerId and s.fsl_tablecode = epod.ownerType where epod.ownerId = and epod.ownerType = and s.skuId is null and exists ( select * from tbl_TPM_Claims c where c.claimId = epod.claimId and c.ownerId = epod.ownerId and c.ownerType = epod.ownerType ) and nullif( epod.itemCode, '' ) is not null order by claimId, mfr_item_code