SQL Queries - CAST Knowledge Base - Queries on source code - How to get the source code of an object

Purpose of Query

 The query returns the source code of the file containing the object

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 source_code
FROM   objfulnam k
       JOIN objfilref obj
         ON k.idobj= obj.idobj
       JOIN refpath refp
         ON refp.idfilref = obj.idfilref
       JOIN dss_code_sources dcs
       on dcs.source_path = refp.path
WHERE  k.fullname = '<fullname of the objects>'
Query result example
 
Query result interpretation
 The query returns the source code of the file containing the object
Query for Oracle
SELECT source_code
FROM   objfulnam k
       JOIN objfilref obj
         ON k.idobj= obj.idobj
       JOIN refpath refp
         ON refp.idfilref = obj.idfilref
       JOIN dss_code_sources dcs
       on dcs.source_path = refp.path
WHERE  k.fullname = '<fullname of the objects>'
Query result example
 
Query result interpretation
 The query returns the source code of the file containing the object
Query for SQL server
SELECT source_code
FROM   objfulnam k
       JOIN objfilref obj
         ON k.idobj= obj.idobj
       JOIN refpath refp
         ON refp.idfilref = obj.idfilref
       JOIN dss_code_sources dcs
       on dcs.source_path = refp.path
WHERE  k.fullname = '<fullname of the objects>'
Query result example
 
Query result interpretation
 The query returns the source code of the file containing the object
Notes/comments
 

 

 

Related Pages