by jfisch
3. December 2009 09:47
I had a request today for some code to search a SQL Server for an object throughout all of the database. I thought I'd post the code I came up with just for future purposes and in case anyone is looking for something of the like:
DECLARE @ObjectName sysname, @SQL nvarchar(max)
SELECT @ObjectName = 'ImportBugs', @SQL = ''