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
 Dependancies

Author  Topic 

gavakie
Posting Yak Master

221 Posts

Posted - 2007-09-28 : 17:31:11
Exec sp_depends I have learned today shows what tables are in a specific view or sp but im noticing it only shows the tables that are in that database. Is there a way to show all tables from all tables that are in that database.

Lamprey
Master Smack Fu Yak Hacker

4614 Posts

Posted - 2007-09-28 : 17:51:06
Not 100% sure what you want, but try looking at:
INFORMATION_SCHEMA.TABLES
INFORMATION_SCHEMA.TABLE_CONSTRAINTS
INFORMATION_SCHEMA.COLUMNS
ETC..
Go to Top of Page

rmiao
Master Smack Fu Yak Hacker

7266 Posts

Posted - 2007-09-28 : 21:48:31
What do you mean 'all tables from all tables that are in that database'?
Go to Top of Page

gavakie
Posting Yak Master

221 Posts

Posted - 2007-10-01 : 09:37:39
So if I have a sp in tableA but in that AP it pulls some info from tableb it only will show the tabels from tableA
Go to Top of Page

spirit1
Cybernetic Yak Master

11752 Posts

Posted - 2007-10-01 : 10:41:06
yes sp_depends only show objects in the current database.
that's how it is.

_______________________________________________
Causing trouble since 1980
blog: http://weblogs.sqlteam.com/mladenp
SSMS Add-in that does a few things: www.ssmstoolspack.com
Go to Top of Page

gavakie
Posting Yak Master

221 Posts

Posted - 2007-10-01 : 10:50:07
Is there away around that or another way of finding that out?
Go to Top of Page

spirit1
Cybernetic Yak Master

11752 Posts

Posted - 2007-10-01 : 11:14:17
nope. you have to go in and look at it manualy

_______________________________________________
Causing trouble since 1980
blog: http://weblogs.sqlteam.com/mladenp
SSMS Add-in that does a few things: www.ssmstoolspack.com
Go to Top of Page
   

- Advertisement -