SQL Clone
SQLServerCentral is supported by Redgate
Log in  ::  Register  ::  Not logged in

Get your favorite SSC scripts directly in SSMS with the free SQL Scripts addin. Search for scripts directly from SSMS, and instantly access any saved scripts in your SSC briefcase from the favorites tab.
Download now (direct download link)

Find a string in Procedures, Triggers, etc

By Joseph Gama,

I want to thank James Travis for his original and excellent work and to Razvan Socol for alerting about a similar problem that led me to improve James' code. The problem is that when searching for a word that is split between two 8kb blocks, James' code would ignore it. The solution is to look for the parts in the adjacent blocks. This code works for words up to 10 chars but the code can be changed to allow longer words. The original code is here: http://www.planet-source-code.com/vb/scripts/showcode.asp?lngWId=5&txtCodeId=414

Total article views: 111 | Views in the last 30 days: 1