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
Explain indexed views?
what happens on checkpoint? : Sql server database administration
How do you delete a data source?
How do you debug a procedure in sql server?
What is the difference between createstatement and preparedstatement?
Suppose you want to implement the following relationships while designing tables. How would you do it?a.) One-to-oneb.) One-to-manyc.) Many-to-many
How many triggers you can have on a table?
What is used to replicate sessions between instances in coldfusion clusters?
How to use the inserted and deleted pseudo tables?
What are the different types of join?
What are commit and rollback in sql?
Define full outer join in sql server joins?
can a database be shrunk with users active? : Sql server administration
Explain the various types of concurrency problem. I.e. Lost or buried updates, uncommitted dependency, inconsistent analysis, phantom read?
How to create a trigger for insert only?