Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 find table name in all query

Author  Topic 

usafelix
Posting Yak Master

165 Posts

Posted - 2014-09-04 : 05:03:12
I have a warehouse table but I don't know which query will update warehouse inside of information ? Thus, how to write a query list all query have include this warehouse table name in there ?


ahmeds08
Aged Yak Warrior

737 Posts

Posted - 2014-09-04 : 05:26:59
can you try this?
SELECT routine_name as objectname, routine_type as objecttype
FROM INFORMATION_SCHEMA.ROUTINES
WHERE ROUTINE_DEFINITION LIKE '%yourtable%'

Javeed Ahmed
Go to Top of Page
   

- Advertisement -