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 |
|
Sun Foster
Aged Yak Warrior
515 Posts |
Posted - 2006-04-14 : 12:52:31
|
| I add a function "fnHour" in a store procedure but I forgot which one. How to search this function within about 200 store procedures? |
|
|
Kristen
Test
22859 Posts |
Posted - 2006-04-14 : 13:02:18
|
| [code]SELECT O.nameFROM syscomments C JOIN sysobjects O ON O.id = C.idWHERE [text] LIKE '%fnHour%'[/code]Kristen |
 |
|
|
Sun Foster
Aged Yak Warrior
515 Posts |
Posted - 2006-04-14 : 16:24:23
|
| No, did not work |
 |
|
|
Kristen
Test
22859 Posts |
Posted - 2006-04-15 : 00:53:31
|
| Didn't list anything, or listed things that did not contain fnHour?Kristen |
 |
|
|
khtan
In (Som, Ni, Yak)
17689 Posts |
Posted - 2006-04-15 : 03:18:20
|
is your stored procedures encrypted ? KH |
 |
|
|
Sun Foster
Aged Yak Warrior
515 Posts |
Posted - 2006-04-15 : 08:03:29
|
| no error but nothing |
 |
|
|
Sun Foster
Aged Yak Warrior
515 Posts |
Posted - 2006-04-15 : 08:05:43
|
| I do not know I did correct or not:I just copy entire your code. Do I need change anything? Like [text] to meet my server? |
 |
|
|
jen
Master Smack Fu Yak Hacker
4110 Posts |
Posted - 2006-04-15 : 08:08:41
|
| either the function does not exist or you need to verifydo a reverse...use not likeand distinct to check how many objects there are, the missing objects will be your clue...--------------------keeping it simple... |
 |
|
|
chiragkhabaria
Master Smack Fu Yak Hacker
1907 Posts |
Posted - 2006-04-15 : 08:16:23
|
| Are you sure the name what name you have specified is correct or you can try somthing like this .. ELECT O.nameFROM syscomments C JOIN sysobjects O ON O.id = C.idWHERE [text] LIKE '%Hour%'or ELECT O.nameFROM syscomments C JOIN sysobjects O ON O.id = C.idWHERE [text] LIKE '%fn%'and just try various filter..If Debugging is the process of removing Bugs then i Guess programming should be process of Adding them. |
 |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2006-04-17 : 02:29:32
|
| Are you sure you run that query at the correct database?MadhivananFailing to plan is Planning to fail |
 |
|
|
Sun Foster
Aged Yak Warrior
515 Posts |
Posted - 2006-04-17 : 07:00:43
|
| I used Kristen's way. It works now! I forgot select DB.Thank you. |
 |
|
|
|
|
|