Use syscomments to update a store procedure

  • Somebody knows how to use syscomments table to update a store procedure, my idea is to change a whole slew of stored procedures all at once using a script

    Thanks

  • PP (2/14/2008)


    Somebody knows how to use syscomments table to update a store procedure, my idea is to change a whole slew of stored procedures all at once using a script

    Thanks

    Microsoft doesn't recommend updating any of the system default tables. If you want to use it as part of a join then you can look into "text" column for the entire SQL definition statement. You need to join sysobjects to syscomments by passing the value of the stored procedure to the sysobjects.name column.

    For updating you can script out the required stored procedures and then do the update in bulk.

    Thanks


    Lucky

  • Thanks Lucky

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

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