|
Posted by Erland Sommarskog on 04/20/07 12:18
Paul (paulwragg2323@hotmail.com) writes:
> Thankyou very much for this. Of course, as usual I stupidly forgot to
> post the version. Sorry about that. Really I need something that will
> work on both SQL Server 2000 and SQL Server 2005.
Then you need to work against sysobjects, sysindexes, sysindexkeys and
syscolumns. The query will be similar, but you need to filter for
statistics, since in SQL 2000 statistics and indexes live in sysindexes.
These are documented in Books Online, and since this is an exercise for you,
I leave you there. :-)
--
Erland Sommarskog, SQL Server MVP, esquel@sommarskog.se
Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/prodtechnol/sql/2005/downloads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodinfo/previousversions/books.mspx
Navigation:
[Reply to this message]
|