how to exclude commented line text in finding procedure with text in sql server

Michael Mikhail 0 Reputation points

I'm trying to find all hard code in SPs and Functions in database that containg all possibilities from below:

Application = 1
Application =1
Application= 1

can I search for that but without results from commented lines ?

SQL Server
SQL Server
A family of Microsoft relational database management and analysis systems for e-commerce, line-of-business, and data warehousing solutions.
12,851 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Erland Sommarskog 102.2K Reputation points MVP

    That is not a trivial operation, as the code has to be parsed.

    As it happens, I have a tool to do read source code strip of the comments, write it back to the database, and then bulid a full-text index on the comment-less code. But the tool is part of a larger toolset, so you may find it hard to get started.

    The toolset is AbaPerls, which you find here: The specific tool I described above is VCDBLOAD, which you can use without understanding the rest of the toolset. But it may still take some time to get started.