sowthri

Query to Access Attributes under Root Node

Discussion created by sowthri on Jan 9, 2013
Latest reply on Jan 9, 2013 by hanyong

Hi ,

 

I'm using the following query to extract all attributes under the root node(Refinery) but it's not working.

 

SELECT  *
FROM PIAFDB.Asset.ElementHierarchy eh
INNER JOIN PIAFDB.Asset.ElementAttribute ea ON ea.ElementID = eh.ElementID
WHERE eh.Path = N'\'
and eh.name = N'Refinery'
ORDER BY ea.Name

 

---------------------------------------------------------------------------------------------------------------------------------------------------------------------

 

Hierachy details

 

 Refinery(Attr1,attr2,attr3)

 

             --->>Area1

 

                                  --->> Unit 1

 

 

Outcomes