title: Query to list SQL Server stored procedures along with lines of code for each procedure
body: <p>I want a query that returns a list of all the (user) stored procedures in a database by name, with the number of lines of code for each one.</p>
  
  <p>i.e.</p>
  
  <pre><code>sp_name     lines_of_code
  --------    -------------
  DoStuff1    120
  DoStuff2    50
  DoStuff3    30
  </code></pre>
  
  <p>Any ideas how to do this?</p>