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 2008 Forums
 Transact-SQL (2008)
 How to get count of records based on ctrid

Author  Topic 

cplusplus
Aged Yak Warrior

567 Posts

Posted - 2011-03-30 : 15:45:01
How to get a count based on ctrid, i have almost 43 ctrid's under table Tab_revisions, now want to see counts on the basis of each ctrid.

select COUNT(*) from dbo.TAB_Revisions based on ctrid

Thank you very much for the helpful info.

yosiasz
Master Smack Fu Yak Hacker

1635 Posts

Posted - 2011-03-30 : 15:46:51
[code]
select COUNT(*), ctrid from dbo.TAB_Revisions
group by ctrid
[/code]

?

If you don't have the passion to help people, you have no passion
Go to Top of Page
   

- Advertisement -