declare @build nvarchar(1024), @name nvarchar(128) declare tmpCur cursor fast_forward read_only for ( select name from dbo.sysobjects where xtype = N'P' and status>0 and name like N'up_CLR%' -- mod here.... ) open tmpCur fetch next from tmpCur into @name while @@fetch_status = 0 begin -- Exec this... print 'drop proc ' + @name fetch next from tmpCur into @name end close tmpCur deallocate tmpCur