Use QueryTransformer to replace SQL expression for the query output columns
I assume I probably need to use query transformer for this but what is the best approach for taking an SQL query created by the user using the control and adding RTrim to all of the string columns in the select query ?
I can see QT has a Columns property but how do I update the columns like this
Select string1,number1,string2 from x where .....
to
Select RTrim(string1),number1,RTrim(string2) from x where .....
Thanks
Note that you can define custom SQL expression for each field in the Metadata Container, so these expressions will replace the field names in the result SQL text.
For the ActiveX edition read the FormattedSQL property to get SQL text with field names; read the FormattedServerSQL to get SQL text with SQL expressions instead of them. Learn more about this feature in this article: Virtual objects and calculated fields.