Selecting Output Fields

Adding and removing fields and expressions

To add a field to the list of query output fields you may check the box at the left of a field name in the datasource field list in the Query Building Area. To include all the fields of the specific object you may check the box at the left of the asterisk item in the datasource field list. Also you may drag fields from the Query Building Area to the Columns pane to get the same result.

Another way to add a field is to select a field name from the drop-down list of the Expression column in the Columns Pane. And of course you may type any valid expression in the Expression column in the Columns Pane. To add an empty line to the Columns pane, press the Alt(Ctrl*)+Insert key.

To remove a field from the Columns Pane you should uncheck the check box at the left of the field name in the Query Building Area or press the Alt(Ctrl*)+Delete key in the Columns Pane.

To move a line in the Columns Pane up and down, you may press the Alt(Ctrl*)+Up/Down keys.

Also you may add, remove and re-order lines at the Columns Pane using the context popup menu.

The Ctrl key is used instead of Alt key for shortcuts in the VCL and ActiveX versions of Visual Query Builder.

Working with Expressions in the Columns Pane

The Output column determines presence of Expression in the SELECT list of the query.

The Alias column allows you to set aliases for your expressions. Aliases become headings of columns in result dataset.

The Asterisk Item

Even if you don't select any fields from query datasources, an asterisk item will be added to the select list of result query ("Select * From ..."). This is made because a SELECT query without any columns will produce an error for most of the database servers.

By selecting any fields or by adding any output expressions to the query, an asterisk item will be removed from result query (you may add it manually at any time). The asterisk items placed first at the datasource field's list are intended to add all fields from specific datasource, not from all of the datasources ("Select datasource.* From ..."). These asterisk items do not affect the rest of the datasource field check boxes, but act independently. If you want to check all the datasource field check boxes, but not the asterisk item, use appropriate items from the datasource context popup menu.

Further information is contained in the following:

© Copyright 2017-2023 ActiveDBSoft. All rights reserved.