5/06/2011

Search Stored Procedures with SQL in SQL Server

Here's a good reference link with sample query to search SQL-Server for TEXT.

- Click Here for Link -

Modified the code slightly:

    DECLARE @StringToSearch varchar(100)
    SET @StringToSearch = 'TRU'
    SET @StringToSearch = '%' + UPPER(@StringToSearch) + '%'
    SELECT DISTINCT SO.NAME
    FROM SYSOBJECTS SO (NOLOCK)
    WHERE SO.TYPE = 'P'
    AND UPPER(SO.NAME) LIKE @StringToSearch

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.

Thoughts to Ponder