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.

 All Forums
 SQL Server 2000 Forums
 Transact-SQL (2000)
 Simple Table Count

Author  Topic 

harrisw48
Starting Member

34 Posts

Posted - 2007-03-08 : 14:26:43
Im trying to create a query that creates a simple count with a total at the bottom

The field Im trying to count by does have NULLS in it.

When I run the code below the rollup total doesnt add up to the amount of records in the table

Whats wrong?

select [field name],
count([field name]) as [Count]
from table
group by [fielname] with rollup

snSQL
Master Smack Fu Yak Hacker

1837 Posts

Posted - 2007-03-08 : 14:41:37
Dupe - http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=80279
Go to Top of Page
   

- Advertisement -