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 convert(varchar,id) + '(' + CONVERT(varchar,count
(id)) + ')' as tot from tblname group by id
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
Would you store your query in a ssrs report or a database server? State the reason why?
what is a mixed extent? : Sql server administration
What is the difference between a check constraint and a rule?
How to list all login names on the ms sql server?
how would you improve etl (extract, transform, load) throughput?
What are the properties of the transactions?
Can we delete data from a view?
Distinguish between commit and rollback?
How to delete existing triggers using "drop trigger"?
List all the types of user-defined functions?
Can we write ddl in trigger?
Explain trigger and its types?
explain extended properties
How to provide login information for a new odbc dsn?
Is it important for a database administrator to understand the operating system and file access?