How to find a String in a Store Procedure?

The following code finds a string thru all store procedures
select p.name from sys.procedures p join 
syscomments c ON c.id=p.object_id
where text like '%TABLENAME%'
To search for a column name in a table use the following:
 Select t.name as tablename,c.* from sys.columns c 
 Join sys.tables t on c.object_id=t.object_id
 where c.name = 'Note'

 

Related Posts

No Comments Yet.

Leave a reply

You must be logged in to post a comment.


Warning: Use of undefined constant XML - assumed 'XML' (this will throw an Error in a future version of PHP) in /homepages/35/d428352912/htdocs/WilliamMendoza/wp-content/plugins/wp-syntaxhighlighter/wp-syntaxhighlighter.php on line 1048