Go to Query List and press the New Simple button.
The following screen appears with three tabs showing common information, such as the query category and description. This information is optional. To define the query, go to the Simple Query tab. To define the configuration how to display the results of the query, go to the View tab.
Click the Simple Query tab to access the Query definition page. The page provides the following features:
A Table/View dropdown menu you use to choose a database table or view to predefine your query
The Field List where all the fields are listed as a row
A Filter List for defining filter conditions for your query
The Row Limit field to restrict the number of result entries for your query
The single steps how to construct a simple query are outlined as follows.
Select a table from the table list.
Define the fields that you want to see.
The Field Function describes the functionality used for the field. The following list shows the supported values of Field Function.
Use the current value of the field
Accumulate the values of the field
Count the number of values of the field
Get the minimum value of the field
Get the maximum value of the field
Get the average value of the field
The Field Name is a field in the selected table.
The User Defined Name allows the results to display a more meaningful name.
Sort allows to define the sorting order for every field if needed.
(Optional) Define Filters.
You must specify at least one field before you can define filters.
AND/OR is needed for any filter except the first. This setting provides the logical connection to the previous filter condition.
The Field Name is the name of the field to be filtered. If a field has a user-defined name, that name is shown in the selection list. Otherwise, a generated name is shown.
The Condition field specifies the operators that are used to filter the values from the database. The following table lists the supported operators.
Filter |
Symbol |
Description |
Number of Requirements |
---|---|---|---|
Equal |
= |
The value must equal the Requirement |
1 |
Not Equal |
<>, != |
The value must not equal the Requirement |
1 |
Less Than |
< |
The value must be less than the Requirement |
1 |
Less Than or Equal |
<=, ≤ |
The value must be less than or equal to the Requirement |
1 |
Greater Than |
> |
The value must be greater than the Requirement |
1 |
Greater Than or Equal |
>=, ≥ |
The value must be greater than or equal to the Requirement |
1 |
Null |
The value must be null |
0 |
|
Not Null |
The value must not be null |
0 |
|
Between |
The value must be in a specified interval |
2 |
|
In |
The value must be equal to an element of a specified list |
1 or more |
|
Like |
The value must contain the given Requirement |
1 |
The Requirement field contains a value that is used for filtering the values returned by the query. The following list contains some examples of things that might go into the Requirement field.
For a between condition
For a like condition
For a like condition
For a like condition
For an in condition
(Optional) Limit the number of data sets.
To limit the number of data sets, select the Limit Query To First option. Then type the number of data sets you want returned.
Click Save to save the query.
The following figure displays the Save this Query As screen. Type a name for the query in the Query Name field, and then click Ok.
After you save your query, you return to a modified version of the Simple Query screen.