Navigation:  Data Outputs Tab > Query Creations > Building a single query >

Selecting Output Fields

Previous pageReturn to chapter overviewNext page

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

QBE10

Selecting output fields

To remove a field from the Columns Pane you should uncheck the checkbox 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 Active 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.

QBE11

Defining field aliases

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, thus it's useless for end-users.

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 are not affect the rest of the datasource field check boxes, but act independently. If you want to check all the datasource field check boxes, not the asterisk item, use appropriate items of the datasource context popup menu.