Add a line in every stored procedure after AS statement

  • I would like to add a line in every stored procedure like below

    After AS STATEMENT ADD CODE : EXEC SETPARM 'SITE'

    Example:

    CREATE PROCEDURE dbo.uspGetAddress @City nvarchar(30)

    AS

    SELECT *

    FROM Person.Address

    WHERE City = @City

    is this possible ?

     

  • Is SETPARM your own stored procedure? I have never heard of "SETPARM" in TSQL.

    It's possible manually, of course.

    You could probably script out all stored procedures as ALTER scripts, & then do a find an replace on "AS\r\n" (assuming none have trailing spaces before the CRLF or continue other statements on the same line as the AS)

     

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply