Search This Blog

Tuesday, May 27, 2008

Searching word in Stored Procedure

Sometime it's very useful if we can search word in Stored Procedure for debugging purposes or etc. Use below script to search with stored procedure using table called "tblLookup"

SELECT ROUTINE_NAME, ROUTINE_DEFINITION
FROM INFORMATION_SCHEMA.ROUTINES
WHERE ROUTINE_DEFINITION LIKE '%tblLookup%'
AND ROUTINE_TYPE='PROCEDURE'
ORDER BY ROUTINE_NAME ASC

No comments: