Created
November 24, 2011 14:47
-
-
Save tonidy/1391498 to your computer and use it in GitHub Desktop.
T-SQL to find a text in stored procedure
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| --kode#1 | |
| SELECT OBJECT_NAME(id) | |
| FROM SYSCOMMENTS | |
| WHERE [text] LIKE '%Foo%' | |
| AND OBJECTPROPERTY(id, 'IsProcedure') = 1 | |
| GROUP BY OBJECT_NAME(id) | |
| --kode#2 | |
| SELECT ROUTINE_NAME, ROUTINE_DEFINITION | |
| FROM INFORMATION_SCHEMA.ROUTINES | |
| WHERE ROUTINE_DEFINITION LIKE '%Foo%' | |
| AND ROUTINE_TYPE='PROCEDURE' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment