Query Selection

You can use and edit existing Queries; also create new ones as needed. Administrators can create System Queries, which are then available for everyone to run, but can only be edited by an Administrator. See Create or Edit a Query.

Field

Description

Query Name

Give your Query a name, to indicate what the contents are without being too wordy.

Description

Describe the Query in detail, if you like.

System Query

For Administrators to make the Query available to all users. Not for Non-administrators.

Use Fields Names in SQL

Tick this checkbox for the Query to show the actual Conquest Database Column Names in the Result Form and SQL text, rather than the Conquest Dictionary Names. It is a “Runtime” option, defaulting to unticked.

Attribute set

Available for queries that include Assets. Selecting an Attribute Set from this pick list, filters the Query result to only include Assets with that Attribute Set. Also, the names in the Field Selection lists now have the corresponding Asset User Field labels, rather than the generic Conquest data column names.

Action Category

Available for queries that include Actions. Selecting an Action Category from this pick list, filters the Query result to only include only include Actions with that Action Category. Also, the names in the Field selection lists now have the corresponding Action User Field labels, rather than the generic Conquest data column names.

Inspection Attribute set

Available for queries that include Asset Inspections (Standard). Selecting an Attribute set from this pick list, filters the Query result to only include Assets Inspections with that Attribute Set. Also, the names in the Field Selection lists now have the corresponding Asset Inspection User Field labels, rather than the generic Conquest data column names.

View and Fields Tab

Lists the Conquest System Views that you have permission to select data from. You may choose from one view or a combination of views. Not all views are compatible with each other e.g. Assets and Requests can’t connect directly but Actions, Assets and Requests can.

The View and Fields Tab lets you select Fields from the Views you have selected and display them in the order that bests suits you:

Things to be aware of:

      The Inspections View is for Asset Inspections recorded by using Standard Asset Inspections. It is not the generic Inspection data from Condition, Defect and Mobile Inspections

      The Defect Action Cross Reference and the Request Action Cross Reference Views must be ticked, when your Query is for a selection of; related Defects and Actions or related Requests and Actions

Each View that is ticked in the Available Views panel, has its Fields made available for selection in the Selected Views panel. When Fields are ticked, they are added to the bottom of the Selected Fields panel, where there are controls for a selected Field, to:

      Move it to the top

      Move it up one at a time

      Move it down one at a time

      Move it to the bottom

      Remove it

The Criteria Tab is for you to create a filter that returns the data that is specific to your query:

See Filtering Data for more details.

The Copy Task will create a copy of the current query and save it as “Copy of ‘query name’”. Non administrative users can copy System Queries, making such copies available to themselves for editing.

The Assign Task is for Administrators to create a Query on behalf of a User and assign it to them.

The Export Task allows you to directly export the result set of a Query to a CSV file.

The Run Task provides you with the Query Results:

At Run time, you may get a warning, if the Query will return more records than the number of rows specified by the System Option ‘Number of Rows in a Query that will generate a warning’. See System Options for details.

The Load Script Task is available for you to load a preconfigured and tested SQL Script into the SQL Tab of the Query Editor.

The SQL Tab is for you to view or edit the SQL of a Query:

Things to be aware of:

      If you make changes to a Query’s SQL in the SQL Tab, access to the View and Fields Tab and the Criteria Tab for that Query is permanently removed because the flexibility of raw SQL makes it impossible to reverse engineer back to the friendlier View, Field and Criteria interfaces

      Administrators can use Insert, Update and Delete SQL, provided that the permission to do so has been allowed in the Conquest Management Console, Application Settings:

      Administrators need to know the Conquest Business Rules, before using SQL to make changes to the Conquest data, so always discuss the work with Conquest Support. It is advisable to make a Database Backup first

      Conquest Solutions does not take responsibility for any data integrity issues that arise from using SQL to make changes to the Conquest data

      SQL statements to make changes to the database structure are not permitted