CQL Syntax Link Conditions (Joins)

<< Click to Display Table of Contents >>

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

CQL Syntax Link Conditions (Joins)

Previous pageReturn to chapter overviewNext page

A Link Condition is CQL equivalent of an SQL "JOIN"

 

The syntax for defining a CQL condition to search on a link is:

 
linktext (subquery)
Note: The linktext can be either

 

the link's form label - the label as it appears on the Item Details (e.g. [Installed Software])
the appropriate forwards/backwards text of the link. This is the text displayed in the Explore window (e.g. [Hosts])
the appropriate forwards/backwards id of the ValidLing (e.g. VLK:123:R or VLK:123:F)

 

 
Example 1

 

Find all Servers which host release 3.5 of the .Net Framework

 

Use the link text 'host' which is the link text used when Exploring and also the text suggested by the Dictionary

 

FIND server WHERE [hosts]

(FIND [PRODUCT COTS] VERSION

       WHERE CIName like '%.NET%'

       AND [COTS Release]like '%3.5%')

 

 

CQL Syntax Find Link

 

 

However we could also use the Item Details text used when the relationship is displayed - i.e. Installed Software

 

CQL Syntax Find Link Item Details

 

 

FIND server WHERE [Installed Software]

(FIND [PRODUCT COTS] VERSION

       WHERE CIName like '%.NET%'

       AND [COTS Release]like '%3.5%')

 

 

or the query could use the ValidLink id including direction

 

FIND server WHERE VLK:123:F 

(FIND [PRODUCT COTS] VERSION

       WHERE CIName like '%.NET%'

       AND [COTS Release]like '%3.5%')

 

 

Example 2

 

Find servers allocated to the QA departments

 

FIND server WHERE [is allocated to] ( FIND Department WHERE name like 'QA%')