- Title test1
- Writer Minwoo, Song Date 2023-11-14/18:53 Read 34
SELECT [full_name], t.name AS [name]
, dbo.getDatAttValueWithUoM(i.noderef, '@LGCMEASURING_COMPONENT', 0) AS [LGCMEASURING_COMPONENT]
, dbo.getDatAttValueWithUoM(i.noderef, '@LGCLOCATION_ON_INSTALLATION', 0) AS [LGCLOCATION_ON_INSTALLATION]
, dbo.getDatAttValueWithUoM(i.noderef, '@LGCRESPONSE_TIME', 0) AS [LGCRESPONSE_TIME]
, dbo.getDatAttValueWithUoM(i.noderef, '@LGCSENSING_PRINCIPLE', 0) AS [LGCSENSING_PRINCIPLE]
, dbo.getDatAttValueWithUoM(i.noderef, '@LGCALARM_SET_POINT_1ST', 0) AS [LGCALARM_SET_POINT_1ST]
, dbo.getDatAttValueWithUoM(i.noderef, '@LGCALARM_SET_POINT_2ND', 0) AS [LGCALARM_SET_POINT_2ND]
, dbo.getDatAttValueWithUoM(i.noderef, '@LGCMEASURING_RANGE', 0) AS [LGCMEASURING_RANGE]
, dbo.getDatAttValueWithUoM(i.noderef, '@LGCLOCATION_ON_ALARM_INSTALLATION', 0) AS [LGCLOCATION_ON_ALARM_INSTALLATION]
, dbo.getDatAttValueWithUoM(i.noderef, '@LGCACCURACY', 0) AS [LGCACCURACY]
, dbo.getDatAttValueWithUoM(i.noderef, '@LGCCALIBRATION_PERIOD', 0) AS [LGCCALIBRATION_PERIOD]
, dbo.getDatAttValueWithUoM(i.noderef, '@LGCOTHERS', 0) AS [LGCOTHERS]
FROM lgc.dbo.vnet_tag_i t
INNER JOIN
lgc.dbo.vnet_instance_i i
ON t.parent = i.noderef
INNER JOIN
lgc.dbo.vnet_class_i c
ON i.class = c.noderef
WHERE t.context in (select t_plant.noderef from lgc.dbo.vnet_instance_i i_plant inner join lgc.dbo.vnet_tag_i t_plant on t_plant.noderef = i_plant.tag
where class in (select noderef from lgc.dbo.vnet_class_i where name = 'PLANT') and t_plant.name != 'LGCHEM')
AND c.name in ( 'FTC_GAS_DETECTOR_050-030-020',
'FTC_LIQUID_LEAKAGE_DETECTOR_050-030-030')
, dbo.getDatAttValueWithUoM(i.noderef, '@LGCMEASURING_COMPONENT', 0) AS [LGCMEASURING_COMPONENT]
, dbo.getDatAttValueWithUoM(i.noderef, '@LGCLOCATION_ON_INSTALLATION', 0) AS [LGCLOCATION_ON_INSTALLATION]
, dbo.getDatAttValueWithUoM(i.noderef, '@LGCRESPONSE_TIME', 0) AS [LGCRESPONSE_TIME]
, dbo.getDatAttValueWithUoM(i.noderef, '@LGCSENSING_PRINCIPLE', 0) AS [LGCSENSING_PRINCIPLE]
, dbo.getDatAttValueWithUoM(i.noderef, '@LGCALARM_SET_POINT_1ST', 0) AS [LGCALARM_SET_POINT_1ST]
, dbo.getDatAttValueWithUoM(i.noderef, '@LGCALARM_SET_POINT_2ND', 0) AS [LGCALARM_SET_POINT_2ND]
, dbo.getDatAttValueWithUoM(i.noderef, '@LGCMEASURING_RANGE', 0) AS [LGCMEASURING_RANGE]
, dbo.getDatAttValueWithUoM(i.noderef, '@LGCLOCATION_ON_ALARM_INSTALLATION', 0) AS [LGCLOCATION_ON_ALARM_INSTALLATION]
, dbo.getDatAttValueWithUoM(i.noderef, '@LGCACCURACY', 0) AS [LGCACCURACY]
, dbo.getDatAttValueWithUoM(i.noderef, '@LGCCALIBRATION_PERIOD', 0) AS [LGCCALIBRATION_PERIOD]
, dbo.getDatAttValueWithUoM(i.noderef, '@LGCOTHERS', 0) AS [LGCOTHERS]
FROM lgc.dbo.vnet_tag_i t
INNER JOIN
lgc.dbo.vnet_instance_i i
ON t.parent = i.noderef
INNER JOIN
lgc.dbo.vnet_class_i c
ON i.class = c.noderef
WHERE t.context in (select t_plant.noderef from lgc.dbo.vnet_instance_i i_plant inner join lgc.dbo.vnet_tag_i t_plant on t_plant.noderef = i_plant.tag
where class in (select noderef from lgc.dbo.vnet_class_i where name = 'PLANT') and t_plant.name != 'LGCHEM')
AND c.name in ( 'FTC_GAS_DETECTOR_050-030-020',
'FTC_LIQUID_LEAKAGE_DETECTOR_050-030-030')