if OBJECT_ID ('SearchForStringInSPsUpd','P') is not null
drop proc SearchForStringInSPsUpd
Go
create PROCEDURE SearchForStringInSPsUpd @searchfor VARCHAR(100)
AS
DECLARE @spcode varchar(8000),
@spname varchar(100),
@occurance int,
@rowcount int,
@xtype varchar(20)
set nocount on
CREATE TABLE #SPNAMES
(SPNAME varchar(100),SPTYPE varchar(20))
DECLARE GETSPCODE CURSOR FOR
SELECT syscomments.text,sysobjects.name,sysobjects.type
FROM
sysobjects,syscomments
WHERE...