.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
 
Sign In
Register
 
Win Surprise Gifts!!!
Congratulations!!!


Top 5 Contributors of the Month
david stephan

Home >> Code Snippets >> SQL Query >> Post New Resource Bookmark and Share   

 Subscribe to Code Snippets

2 Ways to search for a given text is available in a list of Stored procedure in sql

Posted By:Karthikeyan Anbarasan       Posted Date: January 26, 2011    Points: 15    Category: SQL Query    URL: http://www.dotnetspark.com  

2 Ways to search for a given text is available in a list of Stored procedure in sql
 

SELECT ROUTINE_NAME, ROUTINE_DEFINITION 

FROM INFORMATION_SCHEMA.ROUTINES

WHERE ROUTINE_DEFINITION LIKE '%TextSearch%'

AND ROUTINE_TYPE='PROCEDURE'





SELECT OBJECT_NAME(id)

FROM SYSCOMMENTS

WHERE [text] LIKE '%TextSearch%'

AND OBJECTPROPERTY(id, 'IsProcedure') = 1

GROUP BY OBJECT_NAME(id)

     

Further Readings:

Responses

No response found. Be the first to respond this post

Post Comment

You must Sign In To post reply
Find More code samples in C#, ASP.Net, Vb.Net and more Here

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend