Basically what you can do is use the built-in sys tables to search the text (contents) of a stored procedure. It's pretty straightforward so I'll just get right to the code. This simple SQL statement will get the names of any stored procedures that use the field "CurrentMarriageStatus".
SELECT DISTINCT so.[name] FROM sysobjects so INNER JOIN syscomments sc ON so.id = sc.id WHERE sc.[text] LIKE '%CurrentMarriageStatus%'
That's it! Then you can take the results and go through them one at a time to see how they're using the field you searched for.
No comments:
Post a Comment