| Author |
Topic |
|
gavakie
Posting Yak Master
221 Posts |
Posted - 2010-04-12 : 11:10:18
|
| Is there a way to search for a proc that populates a table? |
|
|
DonAtWork
Master Smack Fu Yak Hacker
2167 Posts |
Posted - 2010-04-12 : 11:13:35
|
found this, maybe it does what you want.select specific_name from INFORMATION_SCHEMA.ROUTINESwhere object_definition(object_id(specific_name)) like '%line%' http://weblogs.sqlteam.com/jeffs/archive/2008/05/13/question-needed-not-answer.aspxHow to ask: http://weblogs.sqlteam.com/brettk/archive/2005/05/25/5276.aspxFor ultra basic questions, follow these links.http://www.sql-tutorial.net/ http://www.firstsql.com/tutor.htm http://www.w3schools.com/sql/default.asp |
 |
|
|
Transact Charlie
Master Smack Fu Yak Hacker
3451 Posts |
Posted - 2010-04-12 : 11:13:46
|
If it doesn't do it in a block of dynamic sql you can use sp_depends.Example:EXEC sp_depends employee Returns a list of all objects that reference the employee table.Charlie===============================================================Msg 3903, Level 16, State 1, Line 1736The ROLLBACK TRANSACTION request has no corresponding BEGIN TRANSACTION |
 |
|
|
Transact Charlie
Master Smack Fu Yak Hacker
3451 Posts |
Posted - 2010-04-12 : 11:14:51
|
quote: Originally posted by DonAtWork found this, maybe it does what you want.select specific_name from INFORMATION_SCHEMA.ROUTINESwhere object_definition(object_id(specific_name)) like '%line%'
That looks pretty cool.Charlie===============================================================Msg 3903, Level 16, State 1, Line 1736The ROLLBACK TRANSACTION request has no corresponding BEGIN TRANSACTION |
 |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2010-04-12 : 14:20:20
|
quote: Originally posted by DonAtWork found this, maybe it does what you want.select specific_name from INFORMATION_SCHEMA.ROUTINESwhere object_definition(object_id(specific_name)) like '%line%' http://weblogs.sqlteam.com/jeffs/archive/2008/05/13/question-needed-not-answer.aspxHow to ask: http://weblogs.sqlteam.com/brettk/archive/2005/05/25/5276.aspxFor ultra basic questions, follow these links.http://www.sql-tutorial.net/ http://www.firstsql.com/tutor.htm http://www.w3schools.com/sql/default.asp
Any special reason why you used specific_name rather than routine_name column?------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/ |
 |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2010-04-13 : 02:56:37
|
quote: Originally posted by visakh16
quote: Originally posted by DonAtWork found this, maybe it does what you want.select specific_name from INFORMATION_SCHEMA.ROUTINESwhere object_definition(object_id(specific_name)) like '%line%' http://weblogs.sqlteam.com/jeffs/archive/2008/05/13/question-needed-not-answer.aspxHow to ask: http://weblogs.sqlteam.com/brettk/archive/2005/05/25/5276.aspxFor ultra basic questions, follow these links.http://www.sql-tutorial.net/ http://www.firstsql.com/tutor.htm http://www.w3schools.com/sql/default.asp
Any special reason why you used specific_name rather than routine_name column?------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/
Note that SPECIFIC_NAME is same as ROUTINE_NAME.MadhivananFailing to plan is Planning to fail |
 |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2010-04-13 : 06:33:06
|
quote: Originally posted by madhivanan
quote: Originally posted by visakh16
quote: Originally posted by DonAtWork found this, maybe it does what you want.select specific_name from INFORMATION_SCHEMA.ROUTINESwhere object_definition(object_id(specific_name)) like '%line%' http://weblogs.sqlteam.com/jeffs/archive/2008/05/13/question-needed-not-answer.aspxHow to ask: http://weblogs.sqlteam.com/brettk/archive/2005/05/25/5276.aspxFor ultra basic questions, follow these links.http://www.sql-tutorial.net/ http://www.firstsql.com/tutor.htm http://www.w3schools.com/sql/default.asp
Any special reason why you used specific_name rather than routine_name column?------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/
Note that SPECIFIC_NAME is same as ROUTINE_NAME.MadhivananFailing to plan is Planning to fail
yup..That I know. I was curious on why he used specific_name as such------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/ |
 |
|
|
DonAtWork
Master Smack Fu Yak Hacker
2167 Posts |
Posted - 2010-04-13 : 07:05:48
|
Because it is a snippet of code i stole borrowed from either you or madhi at some point in time.Note i said i FOUND, not WROTE http://weblogs.sqlteam.com/jeffs/archive/2008/05/13/question-needed-not-answer.aspxHow to ask: http://weblogs.sqlteam.com/brettk/archive/2005/05/25/5276.aspxFor ultra basic questions, follow these links.http://www.sql-tutorial.net/ http://www.firstsql.com/tutor.htm http://www.w3schools.com/sql/default.asp |
 |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2010-04-13 : 08:44:25
|
quote: Originally posted by DonAtWork Because it is a snippet of code i stole borrowed from either you or madhi at some point in time.Note i said i FOUND, not WROTE http://weblogs.sqlteam.com/jeffs/archive/2008/05/13/question-needed-not-answer.aspxHow to ask: http://weblogs.sqlteam.com/brettk/archive/2005/05/25/5276.aspxFor ultra basic questions, follow these links.http://www.sql-tutorial.net/ http://www.firstsql.com/tutor.htm http://www.w3schools.com/sql/default.asp
Ok I havent seen anybody using that column yet. Thats why I asked------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/ |
 |
|
|
DonAtWork
Master Smack Fu Yak Hacker
2167 Posts |
Posted - 2010-04-13 : 13:40:19
|
| Ok, i think i pruned it from here with a small change:http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=82962http://weblogs.sqlteam.com/jeffs/archive/2008/05/13/question-needed-not-answer.aspxHow to ask: http://weblogs.sqlteam.com/brettk/archive/2005/05/25/5276.aspxFor ultra basic questions, follow these links.http://www.sql-tutorial.net/ http://www.firstsql.com/tutor.htm http://www.w3schools.com/sql/default.asp |
 |
|
|
|