How to edit sub-query text independently from the entire query?
To display the text of the currently active sub-query and let the user change it, change the SqlEditor.TargetQueryPart property from Query (instructs to display the entire text of the query) to the SubQuery or UnionSubQuery value. The difference between the two latter options is that the SubQuery may contain several SELECT statements united with set operators (UNION, EXCEPT, INTERSECT) while the UnionSubQuery is the currently active single SELECT statement in a sub-query.
To get the text of the active sub-query to execute against a database server and display its result data preview, use the QueryBuilder.ActiveSubQuery.SQL or QueryBuilder.ActiveUnionSubQuery.SQL properties.
To limit the number of records displayed in the data preview, use the QueryTransformer object to add row limitation clause as shown in the Edit Sub-Query Text Demo project which is included in the installation package.