Active Query Builder  »  User's Guide  »  Building a query with sub-queries

User's Guide

Working with sub queries

Index  Previous  Up  Next

Note: This chapter describes working with Sub-queries used in criteria expressions to limit result dataset (in WHERE, HAVING and SELECT clauses). To find out how to work with sub-queries used as datasources for the main query (i.e. in the FROM and WITH clauses), please refer to the Derived tables chapter.

You can add a sub-query as part of the expression or condition in the Columns Pane while editing text in a cell. To add a sub-query, right click at the text position for a new sub-query and select the Insert Sub-query item from context popup menu or type the "(Select)" text to the Expression column, the "= (Select)" or "In (Select)" text to the Criteria column. Please note that curly brackets are necessary.

To build a newly added sub-query visually, confirm editing by pressing the Enter key. The corresponding tab is created above the Query Building Area and the ellipsis button will become visible at the right side of the cell (*). By clicking the ellipsis button, you'll be switched to a sub-query tab where you can build it visually in the same way as the main query. If the cell contains more than one sub-query, the drop-down list will appear to select the necessary sub-query.

(*) The ellipsis button appears only in the VCL and ActiveX Editions of Active Query Builder.

You can always go back to the main query and switch to any sub-query or derived table using tabs above the Query Building Area or using the Query Structure Tree.

Index  Previous  Up  Next

News

Tweets

Testimonials

We have been using Active Query Builder for over a year and must say that both the product and support have been outstanding!

We chose Active Query Builder due to its flexibility and features, but have been truly pleased by its power and hidden capabilities. ...

In summary Active Query Builder provides excellent components, great support and a very flexible feature set. It has allowed us to provide features to our end users that I did not think would be possible in the first release of our new tools and in a timeframe that was much shorter than planned. I would recommend that anyone dealing with databases in the .Net world should be aware of this component and its capabilities!


Social networks