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 / rakesh prasad
In Sql server 2005
select col + '('+ cast (count(col)as varchar(1000))+')'from
tablename group by col
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
what are triggers? : Sql server database administration
What is implicit cursors?
How do you delete a data source?
What is NOT NULL Constraint in sql server 2012?
Do you know what is replace and stuff function in sql server?
What are the five characteristics of good data?
What do you mean by a Composite primary key?
when you create a database how is it stored? : Sql server database administration
hi, the following are the outputs of sp_spaceused and sp_tempdbspace sp_spaceused ------------ database size unallocated size tempdb 77752.95 MB 28026.99 MB sp_tempdbspace ------------- database size spaceused tempdb 77752.945312 1.007812 the unused space in sp_spaceused is nearly 28 Gb and in sp_tempdbspace is nearly 76 Gb cany any one explain about this output and why its giving different results.
how would you troubleshoot blocking? : Sql server database administration
What is difference between stored procedure and user defined function?
What is query cost in sql server?
What is ddl and dml commands?
What is the difference between MVC and Teir Architecher? Plz explain with Layyered Programming example...? Thanks
Explain what is the use of custom fields in report?