Find string occurrance

  • What SQL can I use to find a value contained in stored procedures or triggers in a DB?

  • select object_name(m.object_id) as ObjectName

    from sys.sql_modules m

    join sys.objects o on o.object_id = m.object_id

    where definition like '% string to search for%'

    and o.type in ('P', 'TR')

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply