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

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

Replies

You are reading an archived discussion.

Related Posts

Below article describes the code to be executed when user clicks on Cross (X) button on the top right corner of the window. One demerit is, we can not rollback...
Gogoro, the Taiwanese company, is ready to set foot in the fast-changing, green-embracing automobile market with one of a kind Smartscooter that is zero on emissions and high on latest...
CES 2015 is finally on its way and LG took the stage to announce 7 new 4K OLED TVs and unveil Twin Wash Washing Machine, but the best and what...
Intel Corporation has unveiled the 5th Generation Intel Core processor family that consists of 14 nm processors for consumers and businesses at CES 2015. The 5th Gen Intel Core processors...
During the press event of LG at CES 2015, the company announced a slew of OLED TVs. The South Korean company unveiled seven flexible, curved and flat 4K OLED TVs...