フィールドより関連のストアドの抽出

    技术2022-11-26  43

    USE データベースdeclare @ch as varchar(8000)

    set @ch =ABCD-- -- ALTER     proc PROCSearch-- (-- @ch varchar(1000)-- )-- as

    create table #YYY(a varchar(200))

    select nameinto #tfrom dbo.sysobjectswhere xtype='P'order by name

    while (select count(*) from #t)>0begin 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

    enddrop table #tselect *from #YYYdrop table #YYY

    最新回复(0)