Given a keyword, find the list of stored proc and table which contains that keyword as column

Koushal Patel

Koushal Patel

@koushal-C6mEgp Oct 22, 2024
In various situations, given a column name or any text or string, and we want to find which list of stored procedures has those words in this code, or the table which contains a particular column, we can use below lines of code to know that

Stored procedure search
select distinct name from syscomments c join sysobjects o on c.id=o.id and TEXT like '%XYZ%' order by name
XYD = Desired text

Table Search
select distinct name from syscomments c join sysobjects o on c.id=o.id and TEXT like '%XYZ%' order by name
ABC = Desired column name

Welcome, guest

Join CrazyEngineers to reply, ask questions, and participate in conversations.

CrazyEngineers powered by Jatra Community Platform