Online Documentation for SQL Manager for SQL server

Setting output columns


The Selection tab displays the output columns of the query as a grid.

 

The grid allows you to edit the names of the query output columns, specify their display order and set the aggregate functions for each column. To remove a column from the list, right-click the row and select the Delete current row popup menu item.

 

Visual Query Builder - Selection field menu

 

The popup menu also allows you to insert a nested query and add a CASE clause. To edit the CASE clause, use the CASE END AS dialog.

 

Query Builder - Setting output fields - CASE

 

 

To change the Source column name, click it and then type the column name or select it from the drop-down list.

To change the Name of output column, set the cursor at the corresponding column and type the required column name.

 

To reorder columns in the list, use the iconTools_QB_MoveFieldUp iconTools_QB_MoveFieldDown buttons.

 

Query Builder - Setting output fields

 

 

To set an aggregate function for a column, click the row within the Aggregate column, and then type in the function name or select one from the drop-down list (SUM, MIN, MAX, AVG, or COUNT).

 

The Grouping column displays the grouping state for each of the output columns.

 

CheckBox2 Select only unique records

If you check this option, the duplicate records (if any) are not included into the query result (i.e. the DISTINCT keyword is added to the SQL query text).