How to list the stored procedures that contains more than seven join operations in SQL Server database? -


i have database contains more thousand stored procedures. need list stored procedures contain more 7 join operations optimization purpose.

is there way this?

just examine routine_definition field in information_schema.routines table

select routine_name information_schema.routines  (len(routine_definition) -         len(replace(routine_definition, 'join', ''))) / len('join')>=7 

Comments

Popular posts from this blog

html5 - What is breaking my page when printing? -

html - Unable to style the color of bullets in a list -

c# - must be a non-abstract type with a public parameterless constructor in redis -