Skip to content

Instantly share code, notes, and snippets.

@runzway
Created October 17, 2019 06:27
Show Gist options
  • Save runzway/81401842dc58dff559c106674c43e352 to your computer and use it in GitHub Desktop.
Save runzway/81401842dc58dff559c106674c43e352 to your computer and use it in GitHub Desktop.
DECLARE @needle varchar(255)
SET @needle = '%MaterialHashKey%'
SELECT DISTINCT
o.name AS Object_Name,
o.type_desc
FROM sys.sql_modules m
INNER JOIN
sys.objects o
ON m.object_id = o.object_id
WHERE m.definition LIKE @needle ESCAPE '\';
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment