Click here to Skip to main content
12,750,464 members (36,606 online)
Click here to Skip to main content
Articles » Database » Database » General » Revisions

Tagged as


4 bookmarked
Posted 10 Feb 2010

Count Lines of code in a database

, 26 Apr 2010 CPOL
Assuming that a carriage return represents a line of code, this will count the lines of code in a SQL 2008 database:SELECT ROUTINE_NAME,ROUTINE_TYPE,LEN(ROUTINE_DEFINITION )-len(REPLACE(ROUTINE_DEFINITION,CHAR(10),'')) LOCFROM INFORMATION_SCHEMA.ROUTINESCOMPUTE...



Compare Revision Minor Date Status Editor
2 - publicly available Yes 26-Apr-10 4:25 Available Deeksha Shenoy
1 No 10-Feb-10 15:53 Composing Mycroft Holmes


This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


About the Author

Mycroft Holmes
Software Developer (Senior) Contractor
Singapore Singapore
Started my programming life writing Excel 1.0 macros, God what a long time ago.

Now I'm a dotnet developer, I get to influence direction, play with new toys, build stuff, life is wonderful.

Greatest buzz you can get, walk past a row of desks and see your application running on all of them (and getting paid).

Greatest irritant, pouring 12 months of knowledge and experience into an empty head only to have it leave.

You may also be interested in...

Permalink | Advertise | Privacy | Terms of Use | Mobile
Web01 | 2.8.170215.1 | Last Updated 26 Apr 2010
Article Copyright 2010 by Mycroft Holmes
Everything else Copyright © CodeProject, 1999-2017
Layout: fixed | fluid