update stage set stage.sku_MfrId = a.mfr_id, stage.custom_1 = a.mfr_name from tbl_IMPORT_ProductData stage inner join tblManufacturers a on stage.mfr_mfrName = a.MFRAbbrev_Name where stage.eai_batchid = and stage.sku_MfrId is null and nullif(stage.mfr_mfrName,'') IS NOT NULL update stage set stage.sku_MfrId = a.mfr_id, stage.custom_1 = a.mfr_name from tbl_IMPORT_ProductData stage inner join tblManufacturers a on soundEx(#attributes.datasource#.dbo.RemoveChars(stage.mfr_mfrName,'32,39,40,41,45,47,92')) = soundEx(#attributes.datasource#.dbo.RemoveChars(a.MFRAbbrev_Name,'32,39,40,41,45,47,92')) where stage.eai_batchid = and stage.sku_MfrId is null and nullif(stage.mfr_mfrName,'') IS NOT NULL update stage set stage.sku_MfrId = a.mfr_id, stage.custom_1 = a.mfr_name from tbl_IMPORT_ProductData stage inner join tblManufacturers a on stage.mfr_mfrName= a.mfr_name where stage.eai_batchid = and stage.sku_MfrId is null and nullif(stage.mfr_mfrName,'') IS NOT NULL update stage set stage.sku_MfrId = a.mfr_id, stage.custom_1 = a.mfr_name from tbl_IMPORT_ProductData stage inner join tblManufacturers a on soundEx(#attributes.datasource#.dbo.RemoveChars(stage.mfr_mfrName,'32,39,40,41,45,47,92')) = soundEx(#attributes.datasource#.dbo.RemoveChars(a.mfr_name,'32,39,40,41,45,47,92')) where stage.eai_batchid = and stage.sku_MfrId is null and nullif(stage.mfr_mfrName,'') IS NOT NULL update stage set stage.sku_MfrId = a.objectId, stage.custom_1 = m.mfr_name from tbl_IMPORT_ProductData stage inner join tbl_IMPORT_Aliases a on stage.mfr_mfrName= a.alias inner join tblManufacturers m on m.mfr_id = a.objectId where stage.eai_batchid = and a.ownerid = and a.ownerType = and a.objectType = 'MFRID' and stage.sku_MfrId is null and nullif(stage.mfr_mfrName,'') IS NOT NULL select eai_lineNumber from tbl_IMPORT_ProductData stage where stage.eai_batchid = and stage.sku_MfrId IS NULL and nullif(stage.mfr_mfrName,'') IS NOT NULL select objectId, alias from tbl_IMPORT_Aliases where ownerid = and ownerType = and objectType = 'MFRID' update stage set stage.sku_MfrId = , stage.custom_1 = from tbl_IMPORT_ProductData stage where stage.eai_batchId = and stage.mfr_mfrName = and stage.sku_MfrId IS NULL select stage.sku_MfrId from tbl_IMPORT_ProductData stage where stage.eai_batchId = and stage.ownerType = and stage.ownerid = and stage.sku_MfrId IS NULL update tbl_IMPORT_ProductData set sku_processAction = 'Could Not Map Manufacturer' where eai_batchid = and sku_MfrId IS NULL