Active Query Builder support area

Use QueryTransformer to replace SQL expression for the query output columns

  • updated
  • Completed

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 .....


Select RTrim(string1),number1,RTrim(string2) from x where .....


Andrey Zavyalov, PM

Sorry, this is not possible in ActiveX version of the component. QueryTransformer cannot perform such a transformation.

Andrey Zavyalov, PM

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.