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 / rajkumar v
select SNo, '(' + convert(varchar,count(SNo)) + ')' from
test group by SNo having COUNT(*)>=1
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
What are the different types of replication you can set up in sql server?
What are the different Authentication modes in SQL Server and how can you change authentication mode?
How to return the date part only from a sql server datetime datatype?
What is left outer join in sql server joins?
What is the rdl file?
What stored by the tempdb ? : sql server database administration
What are the advantages of paper records?
Define cross join in sql server joins?
Can we use having clause without group by?
Explain the etl (extraction, transformation, and loading)?
What is Lock table in SQL?
What is log in sql server?
Once setting replication, can you have distributor on sql server 2005, publisher of sql server 2008?
What is logshipping and its purpose?
What is raid, and how it can influence database performance?