select * from tw_biz_safetyconfig tbs
left join
( select replace(device_item, '_', '.') as abc, tag_code, tag_property
from tw_glb_suit_data tgsd
where device_item in ('AT_Venturi_001_Thing', 'AT_PreProcess_001_Thing', 'AT_FreshAir_001_Thing') ) d
on tbs.thingname = abc and tag_property = tbs.propertys
where thingname in ('AT.Venturi.001.Thing', 'AT.PreProcess.001.Thing', 'AT.FreshAir.001.Thing')