SQL Queries - CAST Knowledge Base - Queries on objects - How to list the files that do not have child objects to locate Missing objects


Purpose of Query
 The main purpose of this query is to get all the files that do not have child objects.
Applicable CAST Version
Release
Yes/No
8.3.x(tick)
8.2.x(tick)
8.1.x(tick)
8.0.x(tick)
7.3.x(tick)
Applicable RDBMS
RDBMS
Yes/No
Oracle Server(tick)
Microsoft SQL Server(tick)
CSS2(tick)
Query for CSS

The CSV update have to be executed:


 select * from CDT_OBJECTS p where not exists (select 1 from CTT_OBJECT_PARENTS op where op.PARENT_ID = p.OBJECT_ID) and p.OBJECT_ID IN (select idfil from objfilref)
Query result example

Query result interpretation
 The query has generated all the files that do not have child objects.
Query for Oracle

The CSV update have to be executed


 select * from CDT_OBJECTS p where not exists (select 1 from CTT_OBJECT_PARENTS op where op.PARENT_ID = p.OBJECT_ID) and p.OBJECT_ID IN (select idfil from objfilref)
Query result example

Query result interpretation

The query has generated all the files that do not have child objects.



Related Pages
 Have to be included to the troubleshooting + Generalize to other technologies