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 AS [Object Name], text , * FROM
sysobjects, syscomments
       and sysobjects.type in ('TR')
       and text like 'delete from trn_cashflow%'

No comments:

Post a Comment