In addition to a previous post - this might be helpfull to some sclerotic (ha-ha) persons as me:Finding a string in some stored procedure. You remember the code, you remember that you have written it (well a year ago), but where the hell is it? Ok, here is the code:By replacing string between percent signs - to your string (Pay Attention: this doesn't work on substrings, strings only!) - returns a collection of stored procedures where that string resides. SELECT
ROUTINE_NAME
FROM INFORMATION_SCHEMA.ROUTINES
WHERE ROUTINE_DEFINITION LIKE '%StringImLookingFor%'
AND
ROUTINE_TYPE='PROCEDURE'
Read more: Yonathan Masovich