Jul 29, 2008 #1 manmaria Technical User Joined Aug 8, 2003 Messages 286 Location US How do I know which tables are upto the date for the Stats? I need this for sqlserver 2000. TIA
Jul 29, 2008 1 #2 SQLBill MIS Joined May 29, 2001 Messages 7,777 Location US Try this: Code: SELECT 'Index Name' = i.name, 'Statistics Date' = STATS_DATE(i.id, i.indid) FROM sysobjects o, sysindexes i WHERE o.id = i.id GO Or you can update the script to use JOINs. This is out of the BOL. -SQLBill The following is part of my signature block and is only intended to be informational. Posting advice: FAQ481-4875 Upvote 0 Downvote
Try this: Code: SELECT 'Index Name' = i.name, 'Statistics Date' = STATS_DATE(i.id, i.indid) FROM sysobjects o, sysindexes i WHERE o.id = i.id GO Or you can update the script to use JOINs. This is out of the BOL. -SQLBill The following is part of my signature block and is only intended to be informational. Posting advice: FAQ481-4875
Jul 30, 2008 Thread starter #3 manmaria Technical User Joined Aug 8, 2003 Messages 286 Location US Thank you. It works. Upvote 0 Downvote