select stage.fse_skuid, stage.mfrSkuCode, COALESCE(stage.GTINCase,stage.mfrSkuCode) GTINCase, stage.PrimaryMFRProductImageFileName, stage.PrimaryMFRProductImageURL, stage.SecondaryMFRProductImageFileName, stage.SecondaryMFRProductImageURL, stage.TertiaryMFRProductImageFileName, stage.TertiaryMFRProductImageURL, mfr.mfrAbbrev_Name, stage.eanUPC, stage.eai_importId, stage.eai_lineNumber from tbl_IMPORT_ProductDataEnrichment stage inner join tblManufacturers mfr on ( stage.fse_mfrid = mfr.mfr_id ) where stage.eai_batchId = and stage.fse_skuid IS NOT NULL and coalesce(stage.fse_importStatus,'') NOT LIKE '%SKIP%' select i.imageCode, l.ImgPath, l.ImgName, l.ImgExt from tbl_PRD_Images i with (nolock) inner join qry_ContentLookup l with (nolock) on l.contentid = i.contentid where i.ownerType = and i.ownerid = and i.linkType = 'SKU' and i.linkId = and i.imageCode =