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 hot add cpu in sql server 2008?
Is truncate a dml command?
What is the fastest way to permanently delete a 1 million row table named customers?
Why do we need normalization?
Where is localdb stored?
Does the order of columns in update statements matter?
What is the default sql server instance name?
What are trace flags?
What are transactions in sql?
What are the steps you should follow to start sql server in single-user mode?
What is the purpose of forms?
What are the dmvs?
What are types of storage modes? : sql server analysis services, ssas
What is cursor in ms sql server?
What is sql sandbox in sql server?