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
What is a View ? Can we insert, Update and delete a view?
What is tablesample?
What are the different methods available under sqlcommand class to access the data?
What is ms sql server triggers?
Why do we need normalization?
How to replace null values in expressions using isnull()?
How to change the data type of an existing column with "alter table" statements in ms sql server?
How to disable stored procedure sql server?
What are parameterized reports?
List some case manipulation functions in sql?
Can you pass expressions to function parameters?
How to stop log file growing too big?
Explain about integration services of Microsoft SQL server?
What are sub reports?
What are the benefits and tasks of object explorer? : sql server management studio