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? -

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

ajax - PHP/JSON Login script (Twitter style) not setting sessions -