I need to search for a string inside a stored procedure. This is created by user. So I cannot use this:
SELECT OBJECT_NAME(object_id), AS MYSPDEFINITION
FROM sys.procedures
WHERE OBJECT_DEFINITION(object_id) LIKE '%string%';
I have a column which has stored procedures, example: "execute salarybyid
" and so on, in each and every row up to 200. How to find if these stored procedures have a specific string in them?