Retrieve elements and specific attribute values when present
- Last UpdatedSep 29, 2022
- 1 minute read
- PI System
- PI OLEDB Enterprise 2019
- Developer
SELECT eh.Path + eh.Name Element, ea.Path + ea.Name ElementAttribute, i.Value
FROM NuGreen.Asset.ElementHierarchy eh
LEFT OUTER JOIN NuGreen.Asset.ElementAttribute ea ON ea.ElementID = eh.ElementID AND
ea.Name = N'Blades'
OUTER APPLY NuGreen.Data.InterpolateDiscrete(ea.ID, 't') i
WHERE eh.Path = N'\NuGreen\Houston\Cracking Process\Equipment\'
OPTION (FORCE ORDER)