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 2005 Forums
 Transact-SQL (2005)
 count distinct records

Author  Topic 

esthera
Master Smack Fu Yak Hacker

1410 Posts

Posted - 2008-05-15 : 04:53:49
how can i count in sql the number or records taht would be returned if i did

select distinct site,date from allrecords

harsh_athalye
Master Smack Fu Yak Hacker

5581 Posts

Posted - 2008-05-15 : 05:08:29
[code]select count(*)
from
(select distinct site,date from allrecords) t[/code]

Harsh Athalye
India.
"The IMPOSSIBLE is often UNTRIED"
Go to Top of Page
   

- Advertisement -