CQL Query

<< Click to Display Table of Contents >>

Navigation:  Using Cimera > Searching and Querying > Structured Queries >

CQL Query

Previous pageReturn to chapter overviewNext page

The CQL (Cimera Query Language) Query uses a SQL-style syntax to to find items in the Cimera Database.

 

The CQL Query window can be launched by selecting Menu Query > New Query (CQL) or by selecting to create a new CQL Query from the Manage Queries window

 

The CQL query respects the user's current Hide Items in final state setting.

 

CQL Query - blank

 

The CQL Query has 3 main sections

CQL
Search Results
Dictionary

 

CQL

 

Where the text of the query is entered. Use /* and */ to delimit any comments.

 

Search Results

 

When the query is executed the items that match the criteria executed are displayed in an Item List, a Grid or a Chart.

 

Dictionary

 

The Dictionary lists every Item Type, field, status etc than can be used in a CQL query.

The Dictionary is made visible/hidden by clicking Show Dictionary / Hide Dictionary.

Clicking any of the blue text will copy the text, or an appropriate combination of text into the CQL text area.

Use the drop down in the top right to select the Item Type you wish to inspect.

 

Executing CQL

 

CQL can be executed in 3 ways

Click Menu Run > Run to execute the CQL
Press F5
Select a subset of the text in the CQL text box and press F5 to execute the selected subset. This is most useful when developing the CQL, especially when combined with /* comments */

 

 

First CQL Query Walkthrough

 

CQL Example

 

1.Open the Dictionary, if it is not already open, by clicking Show Dictionary above right the CQL text area or by Menu View > Show dictionary
2.Use the drop down to select the Item Type you want to query against. In this example a Problem
3.Click the Item Type name, Problem - this will add the text FIND Problem WHERE to the query box. Note if the query box is not blank it will just add the name of the Item Type and not FIND and WHERE
4.Click a field to query against, e.g. cistatus. The field will be added to the query
5.Add an operator to the query, e.g. =, <>
6.Click one of the Statuses that are in the Lifecycle for this Item Type - they are listed in Type Information at the top of the window.
If the Item Type you selected cannot be created (see Item Type Inheritance) then there will be no Statuses listed. Select an Inherited By Item Type and select one of its statuses.
7.Press F5 or click Menu Run > Run

 

 

 

See Also

Query Builder Query

Reporting DB Query