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 / madhu sudhan g
Hiiiii
Lets the table name is No1 having column A is of int data Type
Now the query is
select convert(nvarchar(5),A) + '(' +
convert(nvarchar(5),count(1))+')' from NO1 GROUP BY A
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
What is data source document?
What is report rendering ?
Tell me can we use custom code in ssrs?
Tell me what is sql profiler?
What is the significance of null value and why should we avoid permitting null values?
What are the authentication modes in sql server? How can it be changed?
How many columns can we include on clustered index ?
What is indexed view?
Do you know what is sql service broker?
What stored procedure can you use to display the current processes?
What are transactions in sql?
What are recommended options to be used while using db mirroring? : sql server database administration
What is checkpoint in sql server?
What you can do to delete a table without the delete trigger firing?
What is for xml in sql server?