Friday, October 16, 2009

How To Search Text In Script In Database In Procedure

    DECLARE @srchString VARCHAR(1000)
    SET @srchString='Procedure_Name'
    SET @srchString = '%' + @srchString + '%'    
    SELECT O.NAME FROM syscomments  C
    JOIN sysobjects O ON =
    WHERE O.xtype = 'P' AND C.TEXT LIKE @srchString

Creative Commons License
Disclaimers:We have tried hard to provide accurate information, as a user, you agree that you bear sole responsibility for your own decisions to use any programs, documents, source code, tips, articles or any other information provided on this Blog.