Monday, October 21, 2013

Get Text from Procedures, Function, and Views

A quick way to search for dependencies in your TSQL to verify if something is used

SELECT DISTINCT so.id, so.name, sc.text, xtype
FROM syscomments sc
INNER JOIN sysobjects so ON sc.id=so.id
WHERE xtype IN ('P', 'V', 'FN');