Peder Rice Peder Rice - 5 months ago 19
SQL Question

HANA Equivalent of syscomments

I'd like identify all views and procedures in a HANA DB that use a given table. In SQL Server, one can query

sysobjects
and
syscomments
like the following:

SELECT
o.name
FROM sysobjects o
JOIN syscomments c
ON o.id = c.id
WHERE c.comment LIKE '%tableName%'


Is there an equivalent in HANA?

Answer

Well that didn't take long to find. An answer can be found on the SCN.

SELECT
   Procedure_Name
FROM sys.procedures
WHERE Definition LIKE '%tableName%'
Comments