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

How to view existing indexes on an given table using sys.indexes?

1151


How to concatenate two character strings together?

1167


How to connect php with different port numbers?

1147


What does truncate do?

993


List all types of constraints in sql server?

1091


Due to some maintenance being done, the sql server on a failover cluster needs to be brought down. How do you bring the sql server down?

1384


What is ms sql server service broker?

1042


Explain system functions or built-in functions? What are different types of system functions?

1041


What happens if ntwdblib.dll is missing on your machine?

1187


What is change data capture (cdc) in sql server 2008?

1079


What is the difference between a local and a global temporary table?

1174


Explain the working of sql privileges?

1143


What is partitioned view?

960


What do you mean by recursive stored procedure?

991


What is a coalesce function?

1247