Query to list SQL Server stored procedures along with lines of …
https://stackoverflow.com/questions/291574/query-to-list-sql-server-stored-procedures-along-with-lines-of-code-for-each-pro
WEBApr 28, 2017 · select t.sp_name, sum(t.lines_of_code) - 1 as lines_ofcode, t.type_desc. from. (. select o.name as sp_name, (len(c.text) - len(replace(c.text, char(10), ''))) as lines_of_code, case when o.xtype = 'P' then 'Stored Procedure'. when o.xtype in ('FN', 'IF', 'TF') then 'Function'. end as type_desc.
DA: 88 PA: 88 MOZ Rank: 98