I want to search all of my database's stored processes for a specific text. I employ SQL as follows:
SELECT DISTINCT
o.name AS Object_Name,
o.type_desc
FROM sys.sql_modules m
INNER JOIN
sys.objects o
ON m.object_id = o.object_id
WHERE m.definition Like '%[ABD]%';
I want to look for [ABD] in every stored procedure, even the ones with square brackets, but it's not returning the right information. How can I modify my search to accomplish this?