GeoVIP
GeoVIP

Reputation: 1564

How to search commented string in sql server stored procedures?

I have 300 stored procedures.

I want to know if the contain a commented out string or not.

Is it possible ?

For example: I want to search whether --my.dboTbls is commented or not.

Upvotes: 1

Views: 1227

Answers (1)

codingbadger
codingbadger

Reputation: 43974

You could try:

Select p.*
From sys.procedures p
Where Object_Definition(p.Object_Id) Like '%--my.dboTbls%'

Upvotes: 4

Related Questions