User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the MS SQL section within the Web Development category of DaniWeb, a massive community of 402,512 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,688 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our MS SQL advertiser: Programming Forums
Views: 1858 | Replies: 1
Reply
Join Date: Oct 2007
Posts: 2
Reputation: ahady515 is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
ahady515 ahady515 is offline Offline
Newbie Poster

row count

  #1  
Oct 10th, 2007
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,
AddThis Social Bookmark Button
Reply With Quote  
Join Date: May 2006
Location: ★ ijug.net ★
Posts: 866
Reputation: ithelp is on a distinguished road 
Rep Power: 4
Solved Threads: 61
ithelp ithelp is offline Offline
Practically a Posting Shark

Re: row count

  #2  
Oct 11th, 2007
I think you should use count() .
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

DaniWeb MS SQL Marketplace
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

Thread Tools Display Modes

Similar Threads
Other Threads in the MS SQL Forum

All times are GMT -4. The time now is 6:15 pm.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC