Code that will search Triggers, Stored Procs, and Functions in MS SQL Server
DECLARE @SEARCHSTRING VARCHAR(255), @notcontain Varchar(255)
SELECT @SEARCHSTRING = ’10′, @notcontain = ‘Order’
SELECT DISTINCT sysobjects.name AS [Object Name] ,
case when sysobjects.xtype = ‘P’ then ‘Stored Proc’
when sysobjects.xtype = ‘TF’ then ‘Function’
when sysobjects.xtype = ‘FN’ then ‘Function’
when sysobjects.xtype = ‘TR’ then ‘Trigger’
end as [Object Type]
FROM sysobjects,syscomments
WHERE sysobjects.id = syscomments.id
AND sysobjects.type in (‘P’,'TF’,'TR’, ‘FN’)
AND sysobjects.category = 0
AND CHARINDEX(@SEARCHSTRING,syscomments.text)>0
AND1
- CHARINDEX(@notcontain,syscomments.text)=0 or CHARINDEX(@notcontain,syscomments.text)<>0 [↩]
hearing aids says
Great blog, how about links exchanging? Please contact me asap, Thanks.
PERRY says
Purchase@Discount.Abana” rel=”nofollow”>……
Buywithout prescription…
LEWIS says
Cheap@Abana.Online” rel=”nofollow”>..…
Buynow it…
GUY says
Buy@Acai.Online” rel=”nofollow”>.…
Buywithout prescription…
EDUARDO says
acai@berry.detox.fort.worth.where.to.buy” rel=”nofollow”>..…
Buygeneric pills…
BRANDON says
Purchase@Generic.Acai.500mg” rel=”nofollow”>..…
Buyno prescription…
TERRENCE says
coral@calcium.is.it.safe” rel=”nofollow”>..…
Buyit now…
ENRIQUE says
Get@Coral.Calcium.Online” rel=”nofollow”>.…
Buynow it…
SALVADOR says
Buy@Discount.Abilify” rel=”nofollow”>..…
Buygeneric meds…
JAMES says
Purchase@Coral.Calcium.Online” rel=”nofollow”>..…
Buygeneric meds…
PERRY says
Purchase@Discount.Coral.Calcium” rel=”nofollow”>……
Buygeneric pills…
ROY says
Get@Coral.Calcium.Online” rel=”nofollow”>……
Buywithout prescription…
TRACY says
Buy@Cheap.Acai” rel=”nofollow”>……
Buywithout prescription…
RALPH says
Buy@Discount.Acai” rel=”nofollow”>……
Buygeneric drugs…
KENNY says
Purchase@Cheap.Accutane” rel=”nofollow”>.…
Buynow it…
BILLY says
Order@Accutane.Without.Prescription” rel=”nofollow”>.…
Buygeneric drugs…
WILLIAM says
Get@Aciphex.Online” rel=”nofollow”>.…
Buygeneric pills…
BOB says
Order@Generic.Aciphex” rel=”nofollow”>.…
Buygeneric drugs…
VICTOR says
Buy@Discount.Actoplus.Met” rel=”nofollow”>..…
Buygeneric pills zdg…
DARYL says
Purchase@Discount.Actoplus.Met” rel=”nofollow”>..…
Buygeneric drugs krg…
CLIFTON says
Buy@Discount.Actos” rel=”nofollow”>..…
Buygeneric meds qmo…
RAY says
Order@Discount.Acular” rel=”nofollow”>.…
Buygeneric drugs zfk…
LAWRENCE says
Cheap@Adalat.Online” rel=”nofollow”>..…
Buywithout prescription dyo…
LLOYD says
Buy@Cheap.Coral.Calcium” rel=”nofollow”>……
Buywithout prescription xiu…
LEWIS says
Buy@Discount.Acai” rel=”nofollow”>.…
Buygeneric drugs axm…