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
 SQL Server Development (2000)
 DISTINCT and COUNT

Author  Topic 

neutcomp
Posting Yak Master

111 Posts

Posted - 2002-12-23 : 07:52:27
Hello,

SELECT distinct FROM tbl_live_playlist

will give me 3 records.
No I want to count that amount of records something like:
SELECT distinct count(*) FROM tbl_live_playlist
But then he ignores the distinct and gives me 42 records.

How can I build a SQL statment that gives me 3 as a count?

Thanxx
Bjorn

neutcomp
Posting Yak Master

111 Posts

Posted - 2002-12-23 : 07:55:59
I allready found the solution:
SELECT count(DISTINCT(channel_ID)) FROM tbl_live_playlist

Cya
Bjorn
Go to Top of Page
   

- Advertisement -