AnsweredAssumed Answered

AF attribute value SQL access when at same level

Question asked by JF.URBIETA on May 11, 2018
Latest reply on May 11, 2018 by JF.URBIETA

Dear All,


Hope you're fine!


So here is a stupid question (but questions never are stupids, only some answers may be... :-))


In a PI-AF Hierarchy, I've to reach a value for sub attributes in a SQL query. When I need to recover values from parents and grand parents it's ok using the famous ..\..\ syntax!


But here the question is :  how to access a sub-attribute located at same level?


Let me describe it:

I've an attribute called A with a sub attribute called S_A, and I've another attribute called B (at same level than A) with a sub attribute called S_B.

S_B value is a TableLookup with a SQL Clause where I need to use the S_A value as a trigger.


So I've tried  things like:

SELECT Column FROM Table WHERE MyColumn=@[.\A|S_A]

SELECT Column FROM Table WHERE MyColumn=@[..\A|S_A]

SELECT Column FROM Table WHERE MyColumn=@[..\|A|S_A]


SELECT Column FROM Table WHERE MyColumn=@[..|A|S_A]


Of course none of this one is OK, so any help to achieve this please? (Latest version of PI-AF 2017)


Just to add something, if I go to an other branch hierarchy, I can access the values using the MyColumn=@[.\|D]

Knowing D is an attribute with the same level than the parent of A and B...


And optionnally, because I was thinking that SQL commands were misinterpreting dots, may I use a dot as an attribute separator (meaning S.A instead of S_A)


Thanks a lot in advance!