Query: View Properties command (View menu)
Shows the Properties dialog box for the selected item from a Query.
Query Properties: if the item is the Query itself, the Properties dialog box allows you to specify if you want to get:
Unique records (distinct rows) or not when running that query. That allows to eliminate duplicate rows. Example: SELECT DISTINCT FAMILY, PRODUCT FROM SALES_DETAIL
First records of the total rows retrieved by the query. According to the data source used, you can specify a number of records or a percentage. Some databases only accept a number of records and not a percentage. If you enter a percentage, be sure to enter an integer number between 1 and 100, then set the Percent option to Yes. (if you type manually a value, add a percent sign without space as in the following example: 10%. The Percent option will change to Yes and the % sign will disappear. The value box can also be a parameter.
The Number of Records in Data Grid from version 5.0 onwards, this option enables the user to limit the number of rows that are displayed in the data grid (50 by default), this is especially useful when working on queries or demonstrations if the user does not need all the records to be returned. This limit does not effect the datas export or printing, this can only be limited by defining a value in the First Records option in the querys (TOP N). If the user modifies the default value, that is 50, then the new value will only be taken into account for new queries created. If the user does not want to limit the number of rows in the data grid, then they can delete this value or replace it by an asterisk.
Distinct YES and all records |
Distinct NO and 10 first records |
|
|
Distinct NO and 20 % of the records |
Distinct NO and the N first records defined through a parameter |
|
|
You can also create a native virtual field and use the TOPn(x) function proposed in the Aggregate group.
Be careful: the TOPn(x) virtual field must be selected as the first field in the query.
See also: Selected Field Properties
See also: Table Properties