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 / saravanan p

Select cast(idKey as varchar)+'('+cast(count(idKey) as
varchar)+')'
from #tbl1 group by idKey

Is This Answer Correct ?    3 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is hot add cpu in sql server 2008?

897


Is truncate a dml command?

901


What is the fastest way to permanently delete a 1 million row table named customers?

1204


Why do we need normalization?

886


Where is localdb stored?

896


Does the order of columns in update statements matter?

875


What is the default sql server instance name?

998


What are trace flags?

981


What are transactions in sql?

1005


What are the steps you should follow to start sql server in single-user mode?

866


What is the purpose of forms?

921


What are the dmvs?

970


What are types of storage modes? : sql server analysis services, ssas

999


What is cursor in ms sql server?

1103


What is sql sandbox in sql server?

1164