Chad (ch**************@unisys.com) writes:
Thanks for the response.
Sp_depends seems to tell me what SPs reference a table or view.
I am trying to determine which SPs update a COLUMN in a table.
Have a closer look on sysdepends table. Here is a sample:
SELECT o.name, o2.name, c.name
FROM sysobejcts o
JOIN sysdepends d ON o.id = d.id
JOIN sysobjects o2 ON d.depid = o.id
JOIN syscolumns c ON d.depid = c.id
AND d.depnumber = c.colid
WHERE o2.name in ('this_table', 'that_table')
AND d.resultobj = 1
ORDER BY o.name, o2.name, c.name
Note that resultobj could also refer to an INSERT statement.
--
Erland Sommarskog, SQL Server MVP,
es****@sommarskog.se
Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techinf...2000/books.asp