SQL Queries - CAST Knowledge Base - Queries on objects - How to get the algebraic representation of the object position on the source file

Purpose of Query

 The query returns the line start, column start, line end and column end of an 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 SP.line_start, 
       SP.col_start, 
       SP.line_end, 
       SP.col_end
FROM   dss_source_positions SP 
       JOIN dss_code_sources CS 
         ON CS.source_id = SP.source_id 
       JOIN objfulnam k 
         ON k.idobj = SP.object_id 
            AND k.fullname = 'name of the objects' 
Query result example
 20;6;20;19
Query result interpretation
 The query returns the line start, column start, line end and column end


Query for Oracle
SELECT SP.line_start, 
       SP.col_start, 
       SP.line_end, 
       SP.col_end
FROM   dss_source_positions SP 
       JOIN dss_code_sources CS 
         ON CS.source_id = SP.source_id 
       JOIN objfulnam k 
         ON k.idobj = SP.object_id 
            AND k.fullname = 'name of the objects' 
Query result example
 20;6;20;19
Query result interpretation
 The query returns the line start, column start, line end and column end


Query for SQL server
SELECT SP.line_start, 
       SP.col_start, 
       SP.line_end, 
       SP.col_end
FROM   dss_source_positions SP 
       JOIN dss_code_sources CS 
         ON CS.source_id = SP.source_id 
       JOIN objfulnam k 
         ON k.idobj = SP.object_id 
            AND k.fullname = 'name of the objects' 
Query result example
 20;6;20;19
Query result interpretation
 The query returns the line start, column start, line end and column end
Notes/comments



Related Pages