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.
| Author |
Topic |
|
LearnEveryDay
Starting Member
37 Posts |
Posted - 2005-08-10 : 11:20:43
|
| Hi,How do I search particular text in my all stored procedure in a database?Thanks |
|
|
Seventhnight
Master Smack Fu Yak Hacker
2878 Posts |
Posted - 2005-08-10 : 11:24:48
|
Select B.name, A.textfrom yourDb.dbo.syscomments AInner Join yourDb.dbo.sysobjects Bwhere A.text like '%somestring%'EDIT: Don't try to do anything to these tables... only for research purpose!!!Corey Co-worker on The Wizard of Oz "...those three midgets that came out and danced, the freaked me out when I was little. But they are ok now." |
 |
|
|
LearnEveryDay
Starting Member
37 Posts |
Posted - 2005-08-10 : 11:45:29
|
| Hi seventhnight,I tried your code slightly modifying it with my database name but it throws error"Server: Msg 156, Level 15, State 1, Line 4Incorrect syntax near the keyword 'where'."Is it somthing I missed out from your query?Thanks |
 |
|
|
Seventhnight
Master Smack Fu Yak Hacker
2878 Posts |
Posted - 2005-08-10 : 13:10:48
|
oops...forgot the 'On'Select B.name, A.textfrom yourDb.dbo.syscomments AInner Join yourDb.dbo.sysobjects BOn A.id = B.idwhere A.text like '%somestring%' Corey Co-worker on The Wizard of Oz "...those three midgets that came out and danced, the freaked me out when I was little. But they are ok now." |
 |
|
|
X002548
Not Just a Number
15586 Posts |
|
|
LearnEveryDay
Starting Member
37 Posts |
Posted - 2005-08-11 : 05:01:10
|
| Thank you all.It has been very helpful.Thanks |
 |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2005-08-11 : 05:11:06
|
| >>Don't try to do anything to these tables... only for research purpose!!!This will avoid that Select routine_definition from information_Schema.routineswhere routine_definition like '%somestring%'MadhivananFailing to plan is Planning to fail |
 |
|
|
|
|
|