Over a million developers have joined DZone.

Find Text In SQL Code

·
Simple stored procedure used to find text inside other SQL code - great for dependency checking during development.

Oskar Austegard
http://mo.notono.us

ALTER PROC __FindText
	@query varchar(100)
AS
SELECT DISTINCT name, type 
FROM sysobjects so INNER JOIN syscomments sc ON so.id = sc.id
WHERE text LIKE '%' + @query + '%'
ORDER BY name
Topics:

Opinions expressed by DZone contributors are their own.

The best of DZone straight to your inbox.

SEE AN EXAMPLE
Please provide a valid email address.

Thanks for subscribing!

Awesome! Check your inbox to verify your email so you can start receiving the latest in tech news and resources.
Subscribe

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}