SQL-Search Stored Procedures For A Text

To search the all the stored procedures in a database for a given text :
Say you want to find all the stored procedures that have the text-'EmployeeNo' , here's how to go about it .


SELECT OBJECT_NAME(id) FROM SYSCOMMENTS WHERE [text] LIKE  '%EmployeeNo%'
AND OBJECTPROPERTY(id, 'IsProcedure') = 1 GROUP BY OBJECT_NAME(id)
Previous
Next Post »
0 Komentar

ASP.NET - How To Display Animated .GIF On Postback

When designing an interactive web page, it is important for you to let the user know that  an action initiated by him/her is in progress.One...