DaniWeb IT Discussion Community

DaniWeb IT Discussion Community (http://www.daniweb.com/forums/)
-   MS SQL (http://www.daniweb.com/forums/forum127.html)
-   -   row count (http://www.daniweb.com/forums/thread92485.html)

ahady515 Oct 10th, 2007 4:25 pm
row count
 
I am using rowcnt column in sysindexes to report some database statistics.
I used the "max" to get a valid row count (as I found multiple records for many tables) for each table, and added status<>0 in the conditions to get valid results.
All went OK except for some rare cases where empty tables seem to have "old" row count still stuck in the column !!
must I update database statistics using dbcc something !? or is there an additional condition for selecting from sysindexes !?

thanks,

ithelp Oct 11th, 2007 10:47 am
Re: row count
 
I think you should use count() .


All times are GMT -4. The time now is 3:39 am.

Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC