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

What are the different types of replication you can set up in sql server?

985


What are the different Authentication modes in SQL Server and how can you change authentication mode?

1022


How to return the date part only from a sql server datetime datatype?

1023


What is left outer join in sql server joins?

970


What is the rdl file?

123


What stored by the tempdb ? : sql server database administration

1008


What are the advantages of paper records?

907


Define cross join in sql server joins?

966


Can we use having clause without group by?

931


Explain the etl (extraction, transformation, and loading)?

940


What is Lock table in SQL?

1412


What is log in sql server?

1078


Once setting replication, can you have distributor on sql server 2005, publisher of sql server 2008?

906


What is logshipping and its purpose?

945


What is raid, and how it can influence database performance?

1010