14 Dec 2011

SQL SERVER – 2008 – Search Stored Procedure Code – Search Stored Procedure Text


USE AdventureWorks
GO
--Searching for Empoloyee tableSELECT NameFROM sys.proceduresWHERE OBJECT_DEFINITION(OBJECT_ID) LIKE '%Employee%'GO--Searching for Empoloyee table and RateChangeDate column togetherSELECT NameFROM sys.proceduresWHERE OBJECT_DEFINITION(OBJECT_ID) LIKE '%Employee%'AND OBJECT_DEFINITION(OBJECT_ID) LIKE '%RateChangeDate%'GO

ResultSet:
Name
———————————–
uspGetEmployeeManagers
uspGetManagerEmployees
uspUpdateEmployeeHireInfo
uspUpdateEmployeeLogin
uspUpdateEmployeePersonalInfo
Name
———————————–
uspUpdateEmployeeHireInfo
Reference : Pinal Dave (http://blog.SQLAuthority.com)

No comments:

Post a Comment