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)
 Total from Group

Author  Topic 

promsi
Starting Member

1 Post

Posted - 2007-07-27 : 11:57:20
I have a table:

ROW TYPE
1 A
2 B
3 A
4 A
5 B

I want to know how many "types". The result s/b 2, for A and B

Thanks

Steve

nr
SQLTeam MVY

12543 Posts

Posted - 2007-07-27 : 11:59:14
select count(distinct Type) from tbl


==========================================
Cursors are useful if you don't know sql.
DTS can be used in a similar way.
Beer is not cold and it isn't fizzy.
Go to Top of Page
   

- Advertisement -