variables.processProductLines = 0; variables.processCategory = 0; variables.processProducts = 0; variables.processSku = 1; variables.processMemo = 0; variables.processNutritionals = 0; variables.processPackaging = 0; variables.processBrands = 0; variables.processDeletes = 0; variables.processSendEmail = 0; variables.ProcessAllergens = 0; UPDATE i SET i.sku_mfrid = c.objectId, i.prod_mfrid = c.objectId FROM tbl_IMPORT_Aliases c INNER JOIN tbl_IMPORT_productData i ON i.ownerid = c.ownerid AND i.ownerType = c.ownerType AND c.objectType = 'MFRID' AND c.Alias = i.custom_2 WHERE i.eai_batchid = AND i.ownerType = AND i.ownerId = UPDATE i SET i.sku_mfrid = FROM tbl_IMPORT_productData i WHERE i.eai_batchid = AND i.ownerType = AND i.ownerId = with batch as ( select c.eai_batchid, count(*) as batchRows from tbl_IMPORT_ProductData c with (nolock) where c.ownerType = and c.ownerId = and c.eai_batchId = group by c.eai_batchid ), PriceHistory as ( select c.eai_batchid, count(*) as PriceHistoryRows from tbl_IMPORT_ProductData c with (nolock) where c.ownerType = and c.ownerId = and c.eai_batchId = and ( nullif(c.custom_4,'') is not null and nullif(c.custom_3,'') is not null ) group by c.eai_batchid ), SkuUnitPrice as ( select c.eai_batchid, count(*) as SkuUnitPriceRows from tbl_IMPORT_ProductData c with (nolock) where c.ownerType = and c.ownerId = and c.eai_batchId = and ( nullif(c.custom_4,'') is null and nullif(c.custom_3,'') is null ) group by c.eai_batchid ) select isnull(a.batchRows,0) batchRows, isNull(b.PriceHistoryRows,0) PriceHistoryRows, isNull(c.SkuUnitPriceRows,0) SkuUnitPriceRows from batch a left outer join PriceHistory b on a.eai_batchid = b.eai_batchid left outer join SkuUnitPrice c on a.eai_batchid = c.eai_batchid

DATA NOT PROCESSED

This process either updates Sku Unit Prices or Price History Data but not both

If your upload file does not contain sku_month and sku_year (sales period) row data then the Sku Unit Prices will be updated.

If your upload file contains sku_month and sku_year (sales period) then the Price History data will be updated. If any of your rows are missing dates then the process will ABEND.