Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 Transact-SQL (2005)
 find a word in sp or views

Author  Topic 

inbs
Aged Yak Warrior

860 Posts

Posted - 2009-10-22 : 03:14:29
how can i find a word like "Product" in all my Stored Procedures and my views?

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2009-10-22 : 04:01:18
1 Generate script and do search
2 select object_name(c.id) as [object_name] from syscomments as c inner join sysobjects as s on s.id=c.id where c.text like '%Product%' and s.xtype in ('p','v')
3 select name from sysobjects where object_definition(id) like '%Product%' and xtype in ('p','v')

Madhivanan

Failing to plan is Planning to fail
Go to Top of Page
   

- Advertisement -