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
Tell me what are cursors and when they are useful?
What samples and sample databases are provided by microsoft?
What do you understand by the data quality services in sql server?
Difference between connected and disconnected database in .net with sql server?
How do I find information about the install locations for the various instances running on a computer?
What is the architecture of ms sql reporting service?
How to name query output columns in ms sql server?
Explain what are the restrictions while creating batches in sql server?
What are different types of raid configurations? : SQL Server Architecture
How the authentication mode can be changed?
What do you understand by triggers and mention the different types of it?
What are difference between Cluster index and Non-Cluster index?
How to create an multi-statement table-valued function?
What is 4nf in normalization form?
What do you know about system database? : SQL Server Architecture