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

    Koushal Patel

    Koushal Patel

    @koushal-C6mEgp
    Updated: Oct 22, 2024
    Views: 1.3K
    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
    0
    Replies
Howdy guest!
Dear guest, you must be logged-in to participate on CrazyEngineers. We would love to have you as a member of our community. Consider creating an account or login.
Home Channels Search Login Register