Click here to monitor SSC
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 

Get your favorite SSC scripts directly in SSMS with the free SQL Scripts addin. Search for scripts directly from SSMS, and instantly access any saved scripts in your SSC briefcase from the favorites tab.
Download now (direct download link)

Dependencies on a specific table column

By lhughes92,

SQL Server provides a built-in stored procedure, sp_depends, that returns object dependencies.  Recently, I discovered a need for determining dependencies on a table column, not just the table itself.  For example, a table may be referenced by many stored procedures and views, but a specific column in that table may only be referenced in a few of those objects.  The following code will determine which views and stored procedures reference a specific column in a table, and whether the object is a view (V) or stored procedure (P).

Total article views: 535 | Views in the last 30 days: 2
 
Related Articles
FORUM

dependencies between stored procedures

Is there a way to identify the dependencies between stored procedures

SCRIPT

Get dependant Objects

Get Dependant Objects by passing table name or stored procedure name.

SCRIPT

Parse the dependency chain of an object

Parses up & down the dependency chain of an object.

FORUM

How to find the objects that use a stored procedure

How to find the objects that use a stored procedure

FORUM

dynamic object(database/schema/obj) in stored procedure

how to reference multiple database/objects in stored procedure (parameterization)

 
Contribute