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.
| Author |
Topic |
|
victord
Yak Posting Veteran
64 Posts |
Posted - 2002-04-05 : 04:27:19
|
| Dear All,We have got a database with thousands of tables in it, of which we use only a couple of hundreds. Now it has gotten to a stage where we have to know which tables haven't got data in them. The question now is, is there a script or tool that i can use to solve this issue.Please helpThanks in Adnace.Victord |
|
|
Arnold Fribble
Yak-finder General
1961 Posts |
Posted - 2002-04-05 : 05:52:57
|
Something like this should do the trick.SELECT so.name tablenameFROM sysindexes siINNER JOIN sysobjects so ON si.id = so.idWHERE si.indid in (0,1) AND si.rowcnt = 0 AND so.type = 'U' AND so.name <> 'dtproperties' Edited by - Arnold Fribble on 04/05/2002 05:59:58 |
 |
|
|
victord
Yak Posting Veteran
64 Posts |
Posted - 2002-04-05 : 06:40:05
|
| Thanks a lot Arnold,That Sorted my problem.Victord |
 |
|
|
Jay99
468 Posts |
Posted - 2002-04-05 : 09:31:53
|
| Check out this Bad-Mutha.Jay<O> |
 |
|
|
|
|
|