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 is a self join? Explain it with an example? : Sql server database administration

945


how we use window authentication connection with sql server.?

1149


How to use wildcard characters in like operations in ms sql server?

1134


What are partitioned views?

984


How to skip remaining statements in a loop block using continue statements?

992


Can we join two tables without primary key?

1045


How to use old values to define new values in update statements in ms sql server?

1260


How do you identify a foreign key?

1021


How do I view a procedure in sql server?

987


What is ddl command?

968


when you create a database how is it stored? : Sql server database administration

1014


Explain how dts is used to extract, transform and consolidate data?

988


Is truncate autocommit?

934


What is use of except clause? How does it differ from not in clause?

1016


What is the index requirement in SQL Azure?

98