CQL Syntax Versions

<< Click to Display Table of Contents >>

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

CQL Syntax Versions

Previous pageReturn to chapter overviewNext page

The Version keyword is used when the Item Type being queried is Versionable and you want to find specific versions, and not the Stem

 

Example 1

 

Find all 3rd Party Software supplied by Microsoft

 

[Product COTS] is a versioinable Item Type, i.e. it has a single Stem and 0 or more versions

 

FIND [PRODUCT COTS] WHERE

 [Supplied by]

         (FIND Supplier WHERE Name = 'Microsoft' )

 

 

[Supplied by]        is a link on the Stem

 

This will find all the Stems that are Microsoft supplied - e.g. MS Word, Internet Explorer, SQL Server.

 

 

If we want to only find specific versions of Microsoft supplied software then we add Version keywords. We can then add conditions that are based on Version fields as well as those that are based on Stem fields

 

FIND [PRODUCT COTS] Version WHERE

 [Supplied by]

         (FIND Supplier WHERE Name = 'Microsoft' )

 AND [COTS Release] like '%3%'

 

[Supplied by]        is a link on the Stem

[COTS Release]        is a field on the Version

 

 

This will find all Versions whose Stems are Microsoft supplied and that have a 3 in their version.

e.g.

Windows XP-SP3
.Net Framework-3.0
.Net Framework-3.5
Word-2013
BizTalk Server-2013

 

 

Example 2

 

Query for versions of a specific Stem using the Stem name

 

FIND        [PRODUCT COTS] Version

WHERE        ciname like '%xp%'

AND        [COTS Release]like '%3%'

 

 

 

Example 3

Query for versions of a specific Stem using the Stem id

 

Note :

civciid (a composite of civ - ci - id) is the id (id) of the Stem item (ci) which is the parent of the Version (civ) we are querying.

It is described in the Dictionary as the 'Parent CI' in the list of Version fields

 

FIND        [PRODUCT COTS] Version

WHERE        civciid = 'CIS:453'

AND        [COTS Release]like '%3%'