Space TimelineSpace Timeline

Query Builder

Date

Change

Date

Change

Oct 2023

Initial version

Overview

To access the Query Builder, click the Platform tab (1), then click on Query Builder (2).

Opening Query Builder

The Query Builder is an unstructured window that allows a user to run preloaded SQL (Structured Query Language) statements against the production database. This feature is typically used to produce ad hoc reports at very short notice (faster than having us build a report for you). To learn more about how to use SQL, you can visit sites such as W3 Schools for an overview and examples of SQL.

Query Builder Window

This window is not editable in the production database. To add queries, you must create them in the UAT environment and then ask us to promote them when you are ready to move them to production. This feature has the following advantages and limitations:

  1. Query Builder is very fast. Running directly on the database, it has less overhead than on the app tier.

  2. Query Builder allows data table joins not supported in the user interface. Our monitor windows can handle most data queries, but not all. Query Builder is safe, secure, and very simple to use. However, from time to time, users need columns that are not available on our monitor windows. We can add these columns quickly using SQL in this monitor.

  3. There are no page size limitations on this window. Other windows are typically limited to 200 rows per page.

  4. There is no security on this window: all data is accessible. This window is only appropriate for super users or admins in the back office.

Screen Elements

 

  • Query (1) - dropdown containing a list of existing queries or groups sorted by their names

  • Description (2) - brief description of what the query does

  • Group Name (3) - dropdown containing a list of groups sorted by their names (?)

  • Query Text (4) - the SQL code for the selected query.

  • FILTER (5) - action button for displaying results

  • RESULTS (6) - a grid displaying all records matching the selected query

  • Page size (7) - a number of items in each page (default value 100)

  • Total Count (8) - total number of found items

  • ADD (9) - action button for adding a new query

  • DELETE (10) - action button for deleting selected query

  • SAVE (11) - action button for saving recent changes

Working With the Queries

To access the Employee Manager, click the PLATFORM tab (1), then click on Query Builder (2).

Basic Actions

Opening a query

The Query dropdown contains a list of existing queries or groups sorted by their names. When you open the Query Builder, the system displays a list of existing queries by default. To open a query, select it from the list. The system displays the selected query description, group name, and SQL code.

Running a Query

You must have the authority to run a query. If you don't have the authority to do it, you need to ask somebody in your home office to grant you authority or to run it for you and give you the results. The authority to run queries is granted or revoked by the Security Manager.

To run a query, select it and click FILTER. The system displays results in a grid.

Note: Depending on the particular query, the system may ask to specify various query parameters. Enter the parameter and click OK.

Query Groups

All queries are organized into groups. The Group Name is a dropdown containing a list of groups sorted by their names.

How to search for a Query by Group:

  1. Double-click on the Query dropdown,

  2. Select a group

  3. Select a query

How to create a new Group:

  1. Click the “+” button on the right of Query Group dropdown

  2. Click ADD in the Query Type window

  3. Enter the new query type name

  4. Click OK

  5. Click SAVE in the Query Type window.

How to Delete a Group:

  1. Click the “+” button

  2. Select a group from the list

  3. Click DELETE in the Query Type window.

How to reassign a Query:

  1. Open the query in the Query Builder window

  2. Select another group from the Group Name dropdown

  3. Click SAVE.

How to Create a Query

Important: Adding queries is available only in the UAT environment.

Attention: Users cannot execute any query that updates data such as insert, update, or delete.

Additional Features

Unlike the other components, the Query Builder does not support paging (predefined page size and navigation between the pages using the Next and Back buttons). Specify the Page size (number of visible rows to preview) instead and click FILTER. There's no limit to the page size. To see how many records are populated, click the Total Count button.

To export or print the results, position the cursor on the grid and right-click the mouse button.

  • Select Export to export the highlighted record

  • Select Export All to export all results

  • Select Print to send the grid to the printer.

 

Related Pages