SQL Queries - Common SQL Queries - How to retrieve the id and the name of all types of a UA language
Purpose of Query
The query retrieves the id and name of all the types of a given UA language.
Applicable CAST Version
| Release | Yes/No |
|---|---|
| 8.3.x | ✅ |
| 8.2.x | ✅ |
| 8.1.x | ✅ |
| 8.0.x | ✅ |
Applicable RDBMS
| RDBMS | Yes/No |
|---|---|
| Oracle Server | ✅ |
| Microsoft SQL Server | ✅ |
| CSS2 | ✅ |
Query for CSS, Oracle, SQL Server
First you need to retrieve all the category name that are defined in the metamodel file. To do this, follow the steps described in the page xxxMetaModel.xml file
As an example you can refer to the below screenshot :

Run the following query on any of your 3 schema (Management or Local or Central database)
Query
SELECT DISTINCT t.IdTyp,
t.TypNam,
t.TypDsc
FROM TYPCAT ct
JOIN CAT ca
ON ca.IdCat = ct.IdCatparent
JOIN TYP t
ON t.IdTyp = ct.IdTyp
WHERE ca.CatNam IN ('<CATEGORY_1>',
'<CATEGORY_2>',
'<CATEGORY_3>',
... )
-- For PLI Metamodel
-- CATEGORY_1 is APM PLI Module
-- CATEGORY_2 is APM PLI Artifacts
-- CATEGORY_3 is PLI
-- CATEGORY_4 is PL1 Properties
You need to replace <Schema_name> with the name of the Schema
Query result example
1004004;“PLIFunction”;“PLI Function”
1004009;“PLIProcSubscriptedVar”;“PLI Subscripted Variable”
1004006;“PLIFileStructure”;“PLI FileStructure”
1004003;“PLIProject”;“PLI Project”
1004400;“PLI_SUBSET”;“PLI UA”
1004008;“PLIProcedure”;“PLI Procedure”
1004005;“PLIMainProcedure”;“PLI MainProcedure”
1004013;“PLIDB2Table”;“PLI DB2 Table”
1004010;“PLIProcDOVar”;“PLI DO Variable”
1004011;“PLIErrorBlock”;“PLI Error Block”
1004012;“PLIWhenCall”;“PLI When CALL constructs”
Query result interpretation
The query returns the count of used indexes.
Notes/comments
Related Pages