Thursday, September 3, 2009

Search a text within a Trigger


Suppose you need to do a search for all triggers within a DB which has the text (say ‘delete from trn_cashflow’)

SELECT sysobjects.name AS [Object Name], text , * FROM
sysobjects, syscomments
WHERE
       sysobjects.id = syscomments.id
       and sysobjects.type in ('TR')
       and text like 'delete from trn_cashflow%'


No comments:

Post a Comment