USE データベース
declare @ch as varchar(8000)
set @ch =ABCD
--
-- ALTER proc PROCSearch
-- (
-- @ch varchar(1000)
-- )
-- as
create table #YYY
(
a varchar(200)
)
select name
into #t
from
dbo.sysobjects
where
xtype='P'
order by name
while (select count(*) from #t)>0
begin
declare @a varchar(200)
set @a=(select top 1 * from #t)
select text
into #w
from syscomments where id=object_id(@a)
if( select count(*) from #w where text like '%'+@ch+'%' )>0
begin
print @a
insert into #YYY
select @a
end
drop table #w
delete from #t where name=@a
end
drop table #t
select *
from
#YYY
drop table #YYY