Home  |  Articles  |  Scripts  |  Consultancy  |  FAQs  |  Links

 
/*****************************************************************************************
Created: 11/07/2005
By: Jane Zhu
Purpose: Simple script to remove 'duplicated' triggers:
******************************************************************************************/

Select distinct 'drop trigger ' + name as 'TSQL'
from sysobjects
where xtype='TR'
and substring(name,5,1000) not in 
(
select replace(artid,'-','') 
from sysmergearticles
)
and left(name,4) in ('del_','ins_','upd_')
order by TSQL