Query to find documents with a specific name in incident

Posted @ 11/28/2012  06:13 AM By Federico Pena

Description:

This query finds the path name, filename and folder name from custom object attachments to the incident Object. In this particular test, the document name is called “test”. This current solution is for Oracle only

Solution:
select oi.id as Incident_id,
cdfd.PATH_NAME,
cdf.name as File_name,
SUBSTR(CDV.ID,2,3)||’/00’||SUBSTR(CDV.ID,1,1)||’/’||CDV.IDas
folder_name,
cdh.VERSION_ID as F_name
from IMM_INCIDENTS oi
inner join CLB_DMS_FILES CDFon (oi.DOCUMENT = CDF.PARENT_FOLDER_ID )
inner join CLB_DMS_VERSIONSCDV on (CDF.id = CDV.file_id)
inner join CLB_DMS_HISTORIESCDH on (CDV.id = CDH.version_id)
inner join CLB_DMS_FOLDERSCDFD on (CDF.PARENT_FOLDER_ID = CDFD.id)
where cdf.name LIKE ‘%test%’
“Solutions provided by CA Technolgies”

 

CA PPM ask an expert panel