|
If there are not many stored procedures after filtering
Try:
declare @str varchar(8000),@T_sql varchar(8000)
set @str=''
select @str=@str+','+name from sysobjects where xtype='P' and name like'usp_%'
select @str=stuff(@str,1,1,'')
set @T_sql='drop proc '
set @T_sql=@T_sql+replace(@str,',',' drop proc')+''
select @T_sql
exec(@T_sql) |
|