SQL Queries - Common SQL Queries - Corruptions - Corruptions on Metamodel - Get the list of the attributes without associated type

Purpose of Query

The query list the attributes without associated type, you can run the query on central and local schema

Applicable CAST Version
Release
Yes/No
8.3.x (tick)
8.2.x (tick)
8.1.x (tick)
8.0.x (tick)
Applicable RDBMS

 

RDBMS
Yes/No
Oracle Server (tick)
Microsoft SQL Server (tick)
CSS2 (tick)


Query for CSS
SELECT at.attrtyp 
FROM   typattr at 
       JOIN propattr pr 
         ON at.attrtyp = pr.attrtyp 
       JOIN catattr ca 
         ON at.attrtyp = ca.attrtyp 
       LEFT JOIN typ t 
              ON at.idtyp = t.idtyp 
WHERE  at.idtyp IS NULL 
Query result example
  --67585
Query result interpretation
 The query returns the id of the attribute
Query for Oracle
SELECT at.attrtyp 
FROM   typattr at 
       JOIN propattr pr 
         ON at.attrtyp = pr.attrtyp 
       JOIN catattr ca 
         ON at.attrtyp = ca.attrtyp 
       LEFT JOIN typ t 
              ON at.idtyp = t.idtyp 
WHERE  at.idtyp IS NULL 
Query result example
 --67585
Query result interpretation
 The query returns the id of the attribute
Query for SQL server
SELECT at.attrtyp 
FROM   typattr at 
       JOIN propattr pr 
         ON at.attrtyp = pr.attrtyp 
       JOIN catattr ca 
         ON at.attrtyp = ca.attrtyp 
       LEFT JOIN typ t 
              ON at.idtyp = t.idtyp 
WHERE  at.idtyp IS NULL 
Query result example

 --67585

Query result interpretation
 The query returns the id of the attribute
Notes/comments
 

  

Related Pages