Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

if we have a column (Key) in a table.
and values of that column is
Key
1
1
1
2
2
3
3
4
4
5
5
5
and we want to show the data after query..like..

1(3)
2(3)
3(2)
4(2)
5(3)
how many times a single term comes..

Answer Posted / rajkumar v

select SNo, '(' + convert(varchar,count(SNo)) + ')' from
test group by SNo having COUNT(*)>=1

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Sql server reporting services vs. Crystal reports.

131


how will add additional conditions in sql?

1077


How to make conditional sum in ssrs?

177


How many clustered indexes there can be on table ?

1012


Explain system views?

1067


Define candidate key, alternate key, and composite key.

906


How do you handle datasets larger than 50 gb?

162


How can you append an identity column to a temporary table?

925


Explain what are page splits? : SQL Server Architecture

1041


What does set rowcount do?

889


Do you know the cursor optimization tips?

966


What is transact-sql ddl trigger?

1086


List the types of recovery model available in sql server?

915


What is page-level compression?

942


Please explain go command in sql server?

1027