A query form is the interface of the search engine. With a query form, users can query the database even when they have no knowledge of SQL. In the query form, you can place the search terms and choose the operators in order to formulate the query.

1 General View

Query forms appear automatically when you select an object or process from the application menu and before executing it. But not all objects in the application menu have a query form.

2 How to use the query forms

The query form displays fields of elements for which the user may wish to search. One or various fields can be specified in order to limit results. To facilitate this task, the query fields allow the use of metacharacters and relational operators.

The metacharacters and the relational operators help the user to search and manage specific information in the database. A metacharacter can be used in place of a character or multiple characters in a search, and the relational operators are built-in tools that allow the user to perform various calculations on the information in the database. For further information see section Query Examples with Relational Operators and Metacharacters.

Different buttons are available at the bottom of the query form. These buttons are:

Query Buttons
Icon Name Description
Rewind to previous query Reload a past query. If no queries prior to the current one exist, the button will appear darker.
Forward to next query Advance to the next query performed after the currently-displayed one. If no queries after the current one exist, the button will appear darker.
View Document Perform the query and show results on a form. Queries can also simply be activated by pressing the Enter button.

2.1 Types of query form fields

We can find query fields with special characteristics. These are:

  • Required fields: also known as mandatory fields, these fields that must be filled in by the user. The opposite of a required field is an optional field.
  • Default values: the query field contains a preset value, usually the most likely. This can be replaced by a new one.
  • Unusual fields: these fields are not displayed on the main query screen. You need to display the secondary screen to show them.

In some fields, the application has help windows to facilitate data entry.

  • Calendar: date fields allow you to display a calendar that makes it easy to select dates.
  • Guide window: it allows you to establish relational operators more easily, usually related to date or value fields.
  • Selection control: the user has to choose values from a set of options. The system enables different components depending on the selection type, permitting the user to select the appropriate value.
 

2.2 Query Examples with Relational Operators and Metacharacters

At the end of this section there is a video demonstration with some operators.

  1. Queries with Relational Operators: relational operators allow values to be selected based on equality, inequality, or greater/less than conditions.
    Description Operator Entered SQL translation Data types which user can access Database managers
    Select ABC values ABC fieldname = 'ABC' Alphanumeric, numerical, and date values ALL Databases
    Select non-ABC values ABC !=ABC fieldname != 'ABC' Alphanumeric, numerical, and date values ALL Databases
  2. Queries are content operators informed or not informed: query construction in order to obtain sections with informed content or not informed. On relational data bases exists null section concept, it means, columns that aren't marked as null columns. On this table is explained how to locate columns that have null value.
    Description Operator entered SQL Translation Data types which user can access Database Managers
    Select sections with null value. = fieldname IS NULL ALL types ALL Databases
    Select sections with non-null values. != fieldname IS NOT NULL ALL types ALL databases
  3. Queries with value lists: To build a query by entering group values:
    Description Operator entered SQL translation Data types which user can access Database Managers
    Select all sections with AB, GH o YZ values AB|GH|YZ fieldname IN ('AB','GH','YZ') Alphanumeric, numerical, and date values ALL Databases
    Select all sections without AB, GH o YZ values !AB|GH|YZ fieldname NOT IN ('AB','GH','YZ') Alphanumeric, numerical, and date values ALL Databases

  4. Queries by Range: Build queries by entering a range between two values.
    Description Operator entered SQL translation Data types which user can access Database Managers
    Select sections between 200 and 800, inclusive 200:800 fieldname BETWEEN 200 AND 800 Alphanumeric, numerical, and date values ALL Databases
    Select sections not between 200 and 800, inclusive !200:800 fieldname NOT BETWEEN 200 AND 800 Alphanumeric, numerical, and date values ALL Databases
    Select sections between 01-07-2007 and 31-12-2007, inclusive 01-07-2007:31-12-2007 fieldname BETWEEN '01-07-2007' AND '31-12-2007' Alphanumeric, numerical, and date values ALL Databases
    Select sections not between 01-07-2007 and 31-12-2007, inclusive !01-07-2007:31-12-2007 fieldname NOT BETWEEN '01-07-2007' AND '31-12-2007' Alphanumeric, numerical, and date values ALL Databases

  5. Queries with patterns selection of LIKE type: Queries construction through introduction metacharacters of LIKE type.
    Description Operator entered SQL Translation Data types which user can access Database Managers
    Select sections whose strings contain the word GREEN %GREEN% fieldname LIKE '%GREEN%' Alphanumerics ALL Databases
    Select sections whose strings do not contain the word GREEN !%GREEN% fieldname NOT LIKE '%GREEN%' Alphanumerics ALL Databases
    Select sections whose string has at least twice word GREEN %GREEN%GREEN% fieldname LIKE '%GREEN%GREEN%' Alphanumerics ALL Databases
    Select all sections whose string begins with the word GREEN GREEN% fieldname LIKE 'GREEN%' Alphanumerics ALL Databases
    Select sections whose string ends with the word GREEN %GREEN fieldname LIKE '%GREEN' Alphanumerics ALL Databases
    Select sections which have two characters __ fieldname LIKE '__' Alphanumerics ALL Databases
    Select sections whose string begins with 62, on third character accepts any value, on fourth zero and from fourth character, any value. 62_0% fieldname LIKE '62_0%' Alphanumerics ALL Databases
    Select strings which contain a single-character LIKE statement, e.g., to consult sections whose string ends with _s. This option is intended to protect wildcard character sub-band c _. [Not executable in interactive mode, only from SQL.] fieldname LIKE '%#_s' ESCAPE '#' Alphanumerics ALL Databases
  6. Queries with selection patterns of MATCHES type: Build complex queries by entering MATCH-type metacharacters.
    Description Operator entered SQL Translation Data types which user can access Database Managers
    Select sections whose strings contain the word GREEN *GREEN* fieldname MATCHES '*GREEN*' Alphanumerics IBM IDS Informix
    Select sections whose strings do not contain the word GREEN !*GREEN* fieldname NOT MATCHES '*GREEN*' Alphanumerics IBM IDS Informix
    Select sections whose string has at least twice the word GREEN *GREEN*GREEN* fieldname MATCHES '*GREEN*GREEN*' Alphanumerics IBM IDS Informix
    Select all sections whose string begins with the word GREEN GREEN* fieldname MATCHES 'GREEN*' Alphanumerics IBM IDS Informix
    Select sections whose string ends with the word GREEN *GREEN fieldname MATCHES '*GREEN' Alphanumerics IBM IDS Informix
    Select sections which have two characters ?? fieldname MATCHES '??' Alphanumerics IBM IDS Informix
    Select sections whose string begins with 62, on third character accepts any value, on fourth zero and from fourth character, any value. 62?0* fieldname MATCHES '62?0*' Alphanumerics IBM IDS Informix
    Select sections whose string begins with 4, second character should have any value as 1,2,3,4 or 5 and from the third character any value. 4[12345]* fieldname MATCHES '4[12345]*' Alphanumerics IBM IDS Informix
    Select sections whose string begins with ABC and on 4rt character has a value between letter A and M, and from 4th, any value. ABC[A-M] fieldname MATCHES 'ABC[A-M]' Alphanumerics IBM IDS Informix
    Select sections whose string begins with character 6 or 7. [67]* fieldname MATCHES '[67]*' Alphanumerics IBM IDS Informix
    Select sections whose string starts with 43 and on the third character a value between 6 and 9 from and third character any value. 43[6-9]* fieldname MATCHES '43[6-9]*' Alphanumerics IBM IDS Informix

  7. Queries with expression patterns using REGEXP_LIKE functions: build complex queries by entering regular expressions.
    Description Operator entered SQL Translation Data types which user can access Database Managers
    Select sections whose strings contain the word GREEN .*GREEN.* REGEXP_LIKE (fieldname, '.*GREEN.*') Alphanumerics Oracle
    Select sections whose strings do not contain the word GREEN !.*GREEN.* NOT REGEXP_LIKE (fieldname, '.*GREEN.*') Alphanumerics Oracles
    Select sections whose string has at least twice the word GREEN GREEN.*GREEN REGEXP_LIKE (fieldname, 'GREEN.*GREEN') Alphanumerics Oracle
    Select all sections whose string begins with the word GREEN ^GREEN.* REGEXP_LIKE (fieldname, '^GREEN.*') Alphanumerics Oracle
    Select all sections whose string ends with the word GREEN .*GREEN$ REGEXP_LIKE (fieldname, '.*GREEN$') Alphanumerics Oracle
    Select sections which have two characters ^[[:alnum:]]{1}[[:alnum:]]{1}$ REGEXP_LIKE (fieldname, '^[[:alnum:]]{1}[[:alnum:]]{1}$') Alphanumerics Oracle
    Select sections whose string begins with 62, on third character accepts any value, on fourth zero and from fourth character, any value. ^62.0 REGEXP_LIKE (fieldname, '^62.0') Alphanumerics Oracle
    Select sections whose string begins with 4, second character should have any value as 1,2,3,4 or 5 and from the third character any value. ^4[12345] REGEXP_LIKE (fieldname, '^4[12345]') Alphanumerics Oracle
    Select sections whose string begins with ABC and on 4th character has a value between letter A and M. This option will select only sections with four or more characters. ^ABC[A-M]$ REGEXP_LIKE (fieldname, '^ABC[A-M]$') Alphanumerics Oracle
    Select sections whose string begins with character 6 or 7. ^[67] REGEXP_LIKE (fieldname, '^[67]') Alphanumerics Oracle
    Select sections whose string starts with 43 and on the third character a value between 6 and 9 from and third character any value. ^43[6-9] REGEXP_LIKE (fieldname, '^43[6-9]') Alphanumerics Oracle
    Select sections whose string begins with character words 430 or 572 ^430|^572 REGEXP_LIKE (fieldname, '^430|^572') Alphanumerics Oracle
    Select sections whose string ends with the characters 001 or 005 001$|005$ REGEXP_LIKE (fieldname, '001$|005$') Alphanumerics Oracle
    Select sections that contain three consecutive space characters. [[:space:]]{3} REGEXP_LIKE (fieldname, '[[:space:]]{3}') Alphanumerics Oracle

3 Special query forms

3.1 Query form with metaqueries

Metaqueries are those queries that are more likely to be requested by user. For this reason, they are always available through a quick access in the upper left part of the query form and the object.


3.2 Query form from a link with defined variables

This query screen comes from a link that preset values for some input fields. The preset variables are framed at the top of the input fields: in this way the user is aware that certain variables have already been defined and which are they. The delete button, located at the top of the frame, allows easily removing these preset restrictions.

4 Query form options

When a query screen is displayed it is possible, using the icon located on the right of the screen, to show the options menu of the query form.

4.1 The query form type: display mode

In some specific cases the user can choose how to visualize the query form. There are two types display mode, Formauto and Construct. Formauto query forms are reserved for forms, so they are not available for Reports.

Clicking on "Change Query Type", on the right menu, reveals two options:

  1. FormAuto
  2. Construct

Selecting each option changes the main panel interface and the search attributes method too. This option is not available for query forms of Reports.

4.1.1 The Formauto display mode

The Formauto option displays all query sections as shown on the object form. This option improves user comprehension and ability to view various metrics.

4.1.2 The Construct display mode

The Construct query type option contains all possible fields to be completed in two columns. Fields are arranged from left to right, top to bottom.

4.2 Manual SQL Condition

For those users with more advanced knowledge of the SQL and the database, it is possible to manually enter the SQL statement, which, once executed, will work in the same way as the fields of the query form.

This option is not available for query forms of Reports.

4.3 Program a task

This option is not available for query forms of Reports.

Review pending

4.4 Choose document to generate

This option is not available for query forms of Reports.

Review pending

4.5 Add to Bookmarks

Mark your query forms as favorites. You can easily retrieve them from the Desktop menu / User tools / Bookmarks.

4.6 Document information

This link accesses Deister Cloud, where you will find all the documentation related to the applications of the Axional suite.