SQL Query Binding - Indirection

Hi, I have been able to find the syntax for most of my indirection in my scripting but I can seem to find references to the syntax of indirection in SQL, specifically the ‘SQL Query Binding’. Im sure it can be done but cant find how. Can any anyone shorten my learning curve?

Im just trying to make the ‘1’ indirect in order to make it dynamic.(1,2,3,4,5,6,7,8)

SELECT name FROM ProfileList WHERE profilelist_ndx = {SelectPLCProfile.Ov 1 Select.selectedStringValue}


Your learning curve will be short on this one - I just don’t think you can nest references like you want to.

The best way to do this is to have a property outside your query binding that is handling the indirection for you and grabbing the tag value that you want. Then you would reference this property directly in your query instead of trying to dynamically reference a tag. If you bind a custom property to an expression you can use the tag() expression function that takes a string that represents the tagpath you want. You can dynamically build this string to be whatever you want. If you give me a description of where you’re getting all your dynamic values I can probably post an actual example of what I’m talking about.