select m.mfr_id, m.mfr_name
from fsenablers.dbo.tbl_app_configurations c
left outer join tblmanufacturers m
on m.mfr_id = c.ownerid
where c.applicationcode = '1fsbsr'
and c.ownertype = 'mfr'
and c.parametername = 'applist'
and ( c.parametervalue like '%docs%'
or c.parametervalue like '%images%' )
and m.mfr_id in ()
and m.mfr_id in ()
order by m.mfr_name