Predefined queries

Besides setting queries for specimens via the query options you may define separate predefined user-specific queries. These are listed in the menu topic Query - Predefined queries

If you choose one of these predefined queries, the query options will be hidden and the command of the query will be shown at the base of the specimen list. The first line shows the title of the query, the next lines contain the description followed by the part of the query command which restricts the selection of the data sets (= WHERE-clause of the SQL-statement).

 

To return to the user-defined query click on the Show query conditions button.

If you are an administrator, you may create new queries for users. To create a predefined query choose Administration - Queries... from the menu. A window will open as shown below, where you may create, edit and test your queries.

 

In the upper field you define the WHERE-clause of the SQL string of your query. Keep in mind that the queries can refer to different tables, depending on the order column chosen by the user. Thus, queries in DiversityCollection should start with the reference to the primary key of the main table (CollectionSpecimenID in table CollectionSpecimen and depending tables). The lower field contains the description for the query as shown in the user interface. To test a query use the [Test count] and [Test query] buttons.