I have a Query Tag and I would like to refer to the tag’s path in the query. Is this possible? I have tried a few syntaxes but I either get null/error or just the tag’s name and not its full path.
SELECT PreviousValue
FROM Table
WHERE TagPath = '{[.]ThisTag.Path}'
I think the only way you could do that would be to make the tag from a UDT and then reference the UDT specific parameters for PathToTag and PathToParentFolder.
It would be a SQL Tag type in the UDT.
Create a UDT with 2 parameters
Param1 type String
Param2 type String
1 SQL Tag with the settings:
DataSource – Set to {Param1}
Query — SELECT * FROM MyTable WHERE CriteriaColumn=’{Param2}’
Then you just create the instance of the UDT and fill in the parameters.