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 / madhu sudhan g

Hiiiii

Lets the table name is No1 having column A is of int data Type
Now the query is
select convert(nvarchar(5),A) + '(' +
convert(nvarchar(5),count(1))+')' from NO1 GROUP BY A

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 data source document?

1089


What is report rendering ?

162


Tell me can we use custom code in ssrs?

1054


Tell me what is sql profiler?

1083


What is the significance of null value and why should we avoid permitting null values?

1033


What are the authentication modes in sql server? How can it be changed?

1193


How many columns can we include on clustered index ?

1060


What is indexed view?

1026


Do you know what is sql service broker?

1163


What stored procedure can you use to display the current processes?

943


What are transactions in sql?

1136


What are recommended options to be used while using db mirroring? : sql server database administration

1227


What is checkpoint in sql server?

1216


What you can do to delete a table without the delete trigger firing?

1012


What is for xml in sql server?

1140