Search any text in current database.

Database developers often get the change request(s) in stored procedures from application developers as per requirement. Working on such kind of requirement I came across the situation where I have to do the analysis in how many stored procedures I need to implement the changes, the only input I had is sp that uses CAST function. I used the below way to search it… 

DECLARE @varSearch VARCHAR(8000)
SET @varSearch = '%CAST%'
SELECT object_name(id), [text] FROM syscomments where [text] like @varSearch

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s