Query
Visibility
The query containing results and fields is positioned a the left of the window. To visibility of the query can be set in the menu: Query - Show query:
The query fields are displayed in the main form beneath the list of the result
items. You can change this arrangement using the
/
button to place the query fields on the left side of the item list.
To hide the area containing the search fields click on
the button. If the search area is hidden and
you want to start a new search, just click on the
button.
Searching
To search for data, enter the restrictions in the fields for the
search conditions and click on the button. The
agents found in the database will be shown in the list. To add agents
with differing search conditions click on the
button. If you want to remove entries from the selected
list, choose them and click on the
button. This will not delete the data from the database, but
remove them from your query result.
The option to provide a result list with many columns is described in chapter Many result columns.
To change the displayed fields for searching data click on
the button to change the query
options.
A window will open containing the command used to retrieve the data (see below).
To keep the values you entered for the query, you can click on the
button. It will change to
and when restarting the program your query values will be remembered
To speed up the query you may use the optimized version (Standard query:
Optimized query:
).
The optimized query in combination with the
remembering option includes the functionality to preselect data
depending on the query restrictions, e.g. if you search for an
identification and enter a taxonomic name the first identification
matching the restrictions will be preselected in the main window as
shown below.
The set the option for optimized queries and the option to
remember the query settings as default, choose Administration - Customize display... from the menu. In the tab Defaults and miscellaneous select the
Optimized and
Remember option. The buttons in the query will be hidden providing more space.
Certain query fields provide the option to add up to 3 duplicates of themselves. Use the button to add and the
button to remove duplicates. The restrictions can be combined with AND
+
and OR |
. Just click on the + resp. | sign to change between the modes.
Within the query options you have several possibilities to specify your
search restriction. Use the drop-down menu to switch between operators.
The available operators are shown in the tables below.
Availability: t = text, n = numeric, d = date, h = hierarchy, x = XML, e
= EXIF, g = geography, a = annotation, m = module
For an introduction see two short tutorials
Query operators
Op. | Meaning | Example | Avail. |
---|---|---|---|
∼ | search for an entry like… (you may use wildcards) | Pinus s[iy]lvestris % | tn---e-- |
= | search for an entry exactly equal to … | Pinus silvestris L. | tndh---- |
≠ | search for an entry not like... | Pinus s[iy]lvestris % (you may use wildcards) | tn------ |
∅ | search for an entry where a value is missing … | tndhxeg- | |
• | search for an entry where a value is present … | tndhxeg- | |
- | search for an entry between … and … | 2000 - 2003 | tnd----- |
| | search within a list of entries, separated by "|" or one line per value. If wildcards ("%", "_") are included the query will search for values like the given values | 2000 | 2003 ... | 2000 2003 | tn------ |
∈ | search with exclusion of a list of entries with one value per line. Wildcards will be ignored | 2000 2003 | tn—–m |
∉ | search with exclusion of a list of entries with one value per line. Wildcards will be ignored | 2000 2003 | tn—–m |
± | search for an entry where only parts of the date are present… | -.-.2006 | --d----- |
Δ | search including children in a hierarchy … | M-Fungi | ---h---- |
/ | Search for entries containing a given XML node (not for EXIF) | settings | ----x--- |
¬ | Search for entries not containing a given XML node (not for EXIF) | settings | ----x--- |
‡ | Search for entries with a maximal distance of … | POINT(24.24 45.243) | 50 km | ------g- |
O | Search for entries within an area | POLYGON(34.5 ... | ------g- |
¤ | Search for entries outside an area | POLYGON(34.5 ... | ------g- |
+H | Search for entry including lower hierarchy | Picea | Picea abies | -------m |
+S | Search for entry including synonyms | Picea abies | Pinus abies | -------m |
+HS | Search for entry including lower hierarchy and symonyms | Picea | Picea abies | Pinus abies | -------m |
Operators for datasets
Operator | Meaning |
---|---|
∅ | search for missing datasets ... |
• | search for existing datasets ... |
Operators for text
Operator | Meaning | Example |
---|---|---|
∼ | search for an entry like ... | Pinus s[iy]lvestris % (you may use wildcards) |
= | search for an entry exactly equal to ... | Pinus silvestris L. |
≠ | search for an entry not like ... | Pinus s[iy]lvestris% (you may use wildcards) |
∅ | search for an entry where a value is missing ... | |
• | search for an entry where a value is present ... | |
- | search for an entry between ... and ... | 2000 - 2003 |
| | search within a list of entries, separated by "|" or one line per value. If wildcards ("%", "_") are included the query will search for values like the given values | 2000 | 2003 ... | 2000 2003 |
∈ | search with exclusion of a list of entries with one value per line. Wildcards will be ignored | 2000 2003 |
∉ | search with exclusion of a list of entries with one value per line. Wildcards will be ignored | 2000 2003 |
Operators for numeric data
Operator | Meaning | Example |
---|---|---|
= | search for an entry exactly equal to … | Pinus silvestris L. |
< | search for an entry lower than ... | 2006 |
> | search for an entry higher than ... | 2006 |
- | search for an entry between ... and ... | 2000 - 2003 |
| | search within a list of entries, separated by "|" or one line per value | 2000 | 2003 |
∈ | search within a list of entries with one value per line | 2000 2003 |
∉ | search with exclusion of a list of entries with one value per line | 2000 2003 |
∅ | search for an entry where a value is missing ... | |
• | search for an entry where a value is present |
Operators for date values
Operator | Meaning | Example |
---|---|---|
= | search for an entry exactly equal to ... | 20.3.2006 |
< | search for an entry lower than ... | 20.3.2006 |
> | search for an entry higher than ... | 20.3.2006 |
- | search for an entry between two dates... | 20.3.2006 - 29.3.2006 |
± | search for an entry where only parts of the date are present... | -.-.2006 |
∅ | search for an entry where the date is missing … | |
• | search for an entry where the date is present and complete … |
Oparators for hierachy
Operator | Meaning | Example |
---|---|---|
= | search for an entry exactly equal to ... | M-Fungi |
≠ | search for an entry which is not equal to … | M-Fungi |
∅ | search for missing entry ... | |
• | search for present entry ... | |
Δ | search including children in a hierarchy ... | M-Fungi |
Operators for XML
Operator | Meaning | Example |
---|---|---|
~ | Search for entries like a given text (for EXIF) | RDF |
/ | Search for entries containing a given XML node (not for EXIF) | settings |
¬ | Search for entries not containing agiven XML node (not for EXIF) | settings |
∅ | search for missing entry ... | |
• | search for present entry ... |
Operators for geography
Use (via local files or manual creation) resp. (via DiversityGazetteer) button to set geography
Operator | Meaning | Example |
---|---|---|
‡ | Search for entries with a maximal distance of ... | POINT(24.24 45.243) | 50 km |
O | Search for entries within an area | POLYGON(34.5 ... |
¤ | Search for entries outside an area | POLYGON(34.5 ... |
∅ | search for missing entry... | |
• | search for present entry ... |
For yes/no fields exists a checkbox with 3 options:
= yes,
= no,
= undefined
For a search within a lists (using the |, ∈ or ∉ operator) you may double click in the text field to open a window where you can enter your values. To separate the values either use the "|" sign or a new line as shown in the image below.
Query modules
In the query for values linked to another module click on the
button to open a window where you can
search for values within the linked module. A click on the
button will show a list of the selected items. For
some modules you can choose the cache
database as source (if you have the proper
permissions). This option provides a faster query esp. if e.g. the data
of a related module are accessed via a linked
server.
Operator | Meaning | Example |
---|---|---|
∈ | Search for entries with a list | Rosa | Rosa caninia \ |
∉ | Search for entries not within a list | Rosa | Rosa caninia | ... |
+H![]() |
search for entry including lower ierarchy | Picea | Picea abies | ... |
+S ![]() |
search for entry including synonyms | Picea abies | Pinus abies | ... |
+HS![]() |
search for entry including lower hierarchy and synonyms | Picea | Picea abies | Pinus abies | ... |
Change filter mode between link and text | http://tnt.diversityworkbench.de/TaxonNames_Plants/4269 <> Picea abies L. |
Query annotation
To hide the area containing the search fields click on the
button. If the search area is hidden and you wish
to start a new search, simply click on the
button.
To change the displayed fields for searching specimens click on the
button to change the
query options.
The options for a search are displayed in the main window beneath the
list of the items. You may change this arrangement using the
/
button to place the query options on the left side of the item list.
To search for specimens enter the restrictions in the fields for the
search conditions and click on the button. The
specimens found in the database will be shown in the specimen list. To
add specimens with differing search conditions click on the
button. To clear all entries in the query
fields use the
button. You may save and
load the queries you define using the
and
buttons. If the list
of items is longer than your maximal number of returned items, you may
browse the next items with the
button. To
move back to the previous block of items click on the
button. If you wish to remove entries
from the selected list, choose them and click on the
button. This will not
delete the data from the database, but remove them from your query
result.
[The results are sorted according to the column shown in the result
list. ] With the resp.
button you may change the order of the results
between ascending and descending. Results are sorted according to their
string values, e.g M1, M10, M2. For the column AccessionNumber in the
table CollectionSpecimen you have the option to sort the values
according to the numeric value after a prefix (only for optimized query
). Use the context menu of the order column
and add the prefix you want to remove for the sorting. In the above
example, select
Add
Prefix in the context menu and add M as a prefix. Than choose M
(AccessionNumber) as sorting column. The results will then be sorted
like M1, M2, M10 that means according to the numeric value after the
prefix. To remove a prefix select
{height=“10”
width=“14”} Remove Prefix from the context menu. In the upcoming
dialog select the prefix you want to remove and click OK.
For query results with many colums see chapter Many resultcolumns.
To see the command generated by the program to retrieve the data
right-click on the button to open the context
menu (see below).
[A window will open containing the] command used to retrieve the data (see below).
To keep the values you entered for the query, you can click on the
button. It will change to
and when restarting the program your query values will be remembered
To speed up the query you may use the optimized version (Standard query:
Optimized query:
).
The optimized query in combination with the
remembering option includes the functionality to preselect data
depending on the query restrictions, e.g. if you search for an
identification and enter a taxonomic name the first identification
matching the restrictions will be preselected in the main window as
shown below.
The set the option for optimized queries and
the option to
remember the query settings as
default, choose Administration - Customizedisplay... from the menu. In the tab Defaults and
miscellaneous select the
Optimized and
Remeber option. The buttons in the query will be hidden providing
more space.
Certain query fields provide the option to add up to 3 duplicates of
themselves. Use the button to add and the
button to remove duplicates. The restrictions can
be combined with AND ([+]) and OR
([|]). Just click on the
[+] resp. [|] sign to
change between the modes.
Within the query options you have several possibilities to specify your
search restriction. Use the drop-down menu to switch between operators.
The available operators are shown in the tables below.
Availability: t = text, n = numeric, d = date, h = hierarchy, x = XML, e
= EXIF, g = geography, a = annotation, m = module
For an introduction see two short tutorials
Op. Meaning Example Avail.
∼ search for an Pinus s[iy]lvestris % (you tn---e--
entry like... may use
wildcards)
= search for an Pinus silvestris L. tndh----
entry exactly
equal to ...
≠ search for an Pinus s[iy]lvestris % (you tn------
entry not may use
like... wildcards)
∅ search for an tndhxeg-
entry where a
value is missing
...
• search for an tndhxeg-
entry where a
value is present
...
- search for an 2000 - 2003 tnd-----
entry between
... and ...
| search within a 2000 | 2003 ...\ tn------
list of entries, 2000\
separated by 2003
"|" or one
line per value.
If wildcards
("%", "_")
are included the
query will search
for values like
the given values
∈ search within a 2000\ tn-----m
list of entries 2003
with one value
per line.
Wildcards will be
ignored
∉ search with 2000\ tn-----m
exclusion of a 2003
list of entries
with one value
per line.
Wildcards will be
ignored
± search for an -.-.2006 --d-----
entry where only
parts of the date
are present...
Δ search including M-Fungi ---h----
children in a
hierarchy ...
/ Search for settings ----x---
entries
containing a
given XML node
(not for EXIF)
¬ Search for settings ----x---
entries not
containing a
given XML node
(not for EXIF)
‡ Search for POINT(24.24 45.243) | 50 km ------g-
entries with a
maximal distance
of ...
O Search for POLYGON(34.5 ... ------g-
entries within an
area
¤ Search for POLYGON(34.5 ... ------g-
entries outside
an area
+H Search for entry Picea | Picea abies -------m
including lower
hierarchy
+S Search for entry Picea abies | Pinus abies -------m
including
synonyms
+HS Search for entry Picea | Picea abies | Pinus -------m
including lower abies
hierarchy and
symonyms
+———————–+———————–+———————–+
| Operator | Meaning | Example |
+=======================+=======================+=======================+
| Text | | |
+———————–+———————–+———————–+
| ∼ | search for an entry | Pinus s[iy]lvestris |
| | like ... | % (you may use |
| | | wildcards) |
+———————–+———————–+———————–+
| = | search for an entry | Pinus silvestris L. |
| | exactly equal to ... | |
+———————–+———————–+———————–+
| ≠ | search for an entry | Pinus s[iy]lvestris |
| | not like ... | % (you may use |
| | | wildcards) |
+———————–+———————–+———————–+
| ∅ | search for an entry | |
| | where a value is | |
| | missing ... | |
+———————–+———————–+———————–+
| • | search for an entry | |
| | where a value is | |
| | present ... | |
+———————–+———————–+———————–+
| - | search for an entry | 2000 - 2003 |
| | between ... and ... | |
+———————–+———————–+———————–+
| | | search within a list | 2000 | 2003 ...\ |
| | of entries, separated | 2000\ |
| | by "|" or one line | 2003 |
| | per value. If | |
| | wildcards ("%", | |
| | "_") are included | |
| | the query will search | |
| | for values like the | |
| | given values | |
+———————–+———————–+———————–+
| ∈ | search within a list | 2000\ |
| | of entries with one | 2003 |
| | value per line. | |
| | Wildcards will be | |
| | ignored | |
+———————–+———————–+———————–+
| ∉ | search with exclusion | 2000\ |
| | of a list of entries | 2003 |
| | with one value per | |
| | line. Wildcards will | |
| | be ignored | |
+———————–+———————–+———————–+
| Numeric | | |
+———————–+———————–+———————–+
| = | search for an entry | 2006 |
| | exactly equal to ... | |
+———————–+———————–+———————–+
| < | search for an entry | 2006 |
| | lower than ... | |
+———————–+———————–+———————–+
| > | search for an entry | 2006 |
| | higher than ... | |
+———————–+———————–+———————–+
| - | search for an entry | 2000 - 2003 |
| | between ... and ... | |
+———————–+———————–+———————–+
| | | search within a list | 2000 | 2003 |
| | of entries, separated | |
| | by "|" or one line | |
| | per value | |
+———————–+———————–+———————–+
| ∈ | search within a list | 2000\ |
| | of entries with one | 2003 |
| | value per line | |
+———————–+———————–+———————–+
| ∉ | search with exclusion | 2000\ |
| | of a list of entries | 2003 |
| | with one value per | |
| | line | |
+———————–+———————–+———————–+
| ∅ | search for an entry | |
| | where a value is | |
| | missing ... | |
+———————–+———————–+———————–+
| • | search for an entry | |
| | where a value is | |
| | present ... | |
+———————–+———————–+———————–+
| Date | | |
+———————–+———————–+———————–+
| = | search for an entry | 20.3.2006 |
| | exactly equal to ... | |
+———————–+———————–+———————–+
| < | search for an entry | 20.3.2006 |
| | lower than ... | |
+———————–+———————–+———————–+
| > | search for an entry | 20.3.2006 |
| | higher than ... | |
+———————–+———————–+———————–+
| - | search for an entry | 20.3.2006 - 29.3.2006 |
| | between two dates... | |
+———————–+———————–+———————–+
| ± | search for an entry | -.-.2006 |
| | where only parts of | |
| | the date are | |
| | present... | |
+———————–+———————–+———————–+
| ∅ | search for an entry | |
| | where the date is | |
| | missing ... | |
+———————–+———————–+———————–+
| • | search for an entry | |
| | where the date is | |
| | present and complete | |
| | ... | |
+———————–+———————–+———————–+
| Hierachy | | |
+———————–+———————–+———————–+
| = | search for an entry | M-Fungi |
| | exactly equal to ... | |
+———————–+———————–+———————–+
| ≠ | search for an entry | M-Fungi |
| | which is not equal to | |
| | ... | |
+———————–+———————–+———————–+
| ∅ | search for missing | |
| | entry ... | |
+———————–+———————–+———————–+
| • | search for present | |
| | entry ... | |
+———————–+———————–+———————–+
| Δ | search including | M-Fungi |
| | children in a | |
| | hierarchy ... | |
+———————–+———————–+———————–+
| XML | | |
+———————–+———————–+———————–+
| ~ | Search for entries | RDF |
| | like a given text | |
| | (for EXIF) | |
+———————–+———————–+———————–+
| / | Search for entries | settings |
| | containing a given | |
| | XML node (not for | |
| | EXIF) | |
+———————–+———————–+———————–+
| ¬ | Search for entries | settings |
| | not containing a | |
| | given XML node (not | |
| | for EXIF) | |
+———————–+———————–+———————–+
| ∅ | search for missing | |
| | entry ... | |
+———————–+———————–+———————–+
| • | search for present | |
| | entry ... | |
+———————–+———————–+———————–+
| Geography | | |
+———————–+———————–+———————–+
| Use | | |
| | | |
| (via local files or | | |
| manual creation) | | |
| resp. | | |
|  | | |
| (via | | |
| DiversityGazetteer) | | |
| button to set | | |
| geography | | |
+———————–+———————–+———————–+
| ‡ | Search for entries | POINT(24.24 45.243) |
| | with a maximal | | 50 km |
| | distance of ... | |
+———————–+———————–+———————–+
| O | Search for entries | POLYGON(34.5 ... |
| | within an area | |
+———————–+———————–+———————–+
| ¤ | Search for entries | POLYGON(34.5 ... |
| | outside an area | |
+———————–+———————–+———————–+
| ∅ | search for missing | |
| | entry... | |
+———————–+———————–+———————–+
| • | search for present | |
| | entry ... | |
+———————–+———————–+———————–+
For yes/no fields exists a checkbox with 3 options:
= yes,
= no,
= undefined
For a search within a lists (using the |, ∈ or ∉ operator) you may double click in the text field to open a window where you can enter your values. To separate the values either use the "|" sign or a new line as shown in the image below.
Query modules
In the query for values linked to another module click on the
button to open a window where you can
search for values within the linked module. A click on the
button will show a list of the selected items. For
some modules you can choose the cachedatabase as source (if you have the proper
permissions). This option provides a faster query esp. if e.g. the data
of a related module are accessed via a linkedserver.
Module related tutorial:
restriction
∈ Search for entries with a list ... Rosa | Rosa caninia | ...
∉ Search for entries not within a list Rosa | Rosa caninia | ...
+H search for entry including lower hierarchy Picea | Picea abies | ...
+S search for entry including synonyms Picea abies | Pinus abies | ...
+HS search for entry including lower hierarchy Picea | Picea abies | Pinus abies | ...
and synonyms
Change filter mode between [[http://tnt.diversityworkbench.de/TaxonNames_Plants/4269]]
[[link]] Picea abies L.
and text
Query annotation
The query for annotations deviates from the standard query (see below).
Additionally, you may specify a type of the annotation (Annotation
, Problem
, Reference
) and the linked table (see
Annotation).
Query any fields
The query for any fields will search in several
fields, e.g. withholding reasons in specimen, images etc. There are two
versions: The first version (e.g. Notes) will search in all tables but
not in collection event tables while the second version (e.g. Any notes)
will search in any table (see image below).
Wildcards in SQL
There are 4 different possibilities for wildcards in SQL:
Operator | Description | Example | Result |
---|---|---|---|
% | any string consisting of no, one or many characters | Pinus % | will find anything like Pinus, Pinus sylvestris, Pinus strobus etc. |
* | same effect as % (see above) | ||
_ | a single character | Pinus s_lvestris | will find Pinus sylvestris and Pinus silvestris etc. |
[…] | any character out of a given range like [abcde] or [a-e] | Pinus s[iy]lvestris | will find Pinus sylvestris and Pinus silvestris |
[^…] | any character not in a given range like [^abcde] or [^a-e] | Pinus s[^i]lvestris | will find Pinus sylvestris but not Pinus silvestris |
Many columns
The option to include several columns in the result list is only
available for optimized queries . To display
several columns in the result list, click on the
button next to the order by column (see below). A window will open where
you can select the next column for the sorting. Underneath the order by
column the second column for the sorting will be added. To remove this
sorting column you can click on the
button. By
default the width for the columns is set to 10. You can change this
according to content. To set the width to the maximal length of the
current content, click on the
button.
To change the sorting of the added order column click on the
button. The colums are separated via "
| " as shown in the image below.