/****** Object: Stored Procedure dbo.sp_FindInstanceInSP Script Date: 03/29/2000 11:29:04 AM ******/ if exists (select * from sysobjects where id = object_id('dbo.sp_FindInstanceInSP') and sysstat & 0xf = 4) drop procedure dbo.sp_FindInstanceInSP GO /****** Object: Stored Procedure dbo.sp_FindInstanceInSP Script Date: 03/29/2000 11:29:04 AM ******/ create procedure sp_FindInstanceInSP @DbName varchar(40) = null, @TableName varchar(40) = null as begin set nocount on select DbName = @DbName, Instance = @TableName print '' exec ("select 'Stored Procedures' = name from " + @DbName + "..sysobjects where type = 'P' and id in (select id from " + @DbName + "..syscomments where text like '%" + @TableName + "%' group by id) order by name") set nocount off return end GO