Showing posts with label find keyword in functions and procedures. Show all posts
Showing posts with label find keyword in functions and procedures. Show all posts

Sunday, December 6, 2009

Find any keyword stored inside MS-Sql 'Function' or 'Procedure'.

Hi All,

As developer, one have frequently facing with problem of finding function or procedure in which they have made change. Here is how you will find out any keyword which you are looking for..

SELECT ROUTINE_NAME, ROUTINE_DEFINITION
FROM INFORMATION_SCHEMA.ROUTINES
WHERE ROUTINE_DEFINITION LIKE '%KEYWORD%'
AND ROUTINE_TYPE='PROCEDURE' -- Write 'FUNCTION' to search in function.
ORDER BY ROUTINE_NAME

Happy Coding :-)