1

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.

Jens Mühlenhoff
  • 14,057
  • 6
  • 49
  • 105
GeoVIP
  • 1,442
  • 9
  • 25
  • 43
  • A similar one http://stackoverflow.com/questions/17192411/can-i-open-or-save-storedprocedures-and-functions-body-from-msms-from-tsql-no/17192526#17192526 if you want to see the code of all those procs and functions in one place – andreister Jun 21 '13 at 10:45
  • would you also want to find '-- my.dboTbls' , or even '/*my.dboTbls*/' ? – JamieA Jun 21 '13 at 10:56

1 Answers1

4

You could try:

Select p.*
From sys.procedures p
Where Object_Definition(p.Object_Id) Like '%--my.dboTbls%'
codingbadger
  • 40,660
  • 13
  • 93
  • 109