Use the Query Builder - Fields page to select the database columns that will make up the fields in your query. You can design a query to retrieve all the columns associated with each table, or you can select specific columns to retrieve.
To select the database columns that will make up the query fields:
Select the desired database columns.
To select all of the columns in a table, select the table using one of the methods described above. To delete a column from Query Fields, click the column and click the left-arrow. (To select more than one column to delete, hold down the [Ctrl] key and click the desired columns.)
Use to define database column order in the default report layout.
The default layout is the layout that initially appear when you format a report in the Layout window. The order in which the database columns appear on the Fields page is the order in which the columns will appear in the default report layout. You can change the column order as you format your report in the layout if desired.
Subqueries must have at least one database column to work. (An expression cannot substitute for a database column.)
Field | Description |
---|---|
Eliminates duplicate query rows; only rows that are distinctly different are returned. Distinct Values Example | |
Limits the number of query rows. Limiting the Number of Query Rows Example | |
Select Expression to access the Expression Builder (see Accessing the Expression Builder ), where you can add expressions to the query, or select Subquery to define a subquery (see Understanding Subqueries). To modify an existing expression or subquery, select the expression or subquery and click Edit or double-click the expression or subquery. | |
Accesses the Group By dialog box, where you can manually configure the grouping (see Grouping Columns). | |
Accesses the Having Clauses dialog box (see Creating Having Clauses), where you can create Having Clauses for the query. SQR Production Reporting Studio enables the Having button only if you create an Expression that uses an Aggregate Function. | |
Displays the SQL code used to generate the query. You can copy the SQL code from the Show SQL window to the SQL editor provided by your database client software. Advanced users may find this useful for debugging queries. | |
Accesses the Custom From Clause Builder where you can create custom From clauses to use in your query (see Creating Custom From Clauses). | |
Accesses the Where Clauses dialog box where you can enter query conditions and customize the rows of data retrieved. | |
Accesses the Order By dialog box where you can sort by one or more database columns (see Sorting Data). |