i have a table #temp1(id, Name groupname ) and record
like this 1 R1 S
2 R3 S
3 R2 S
4 R4 D
5 R5 D
6 R6 K
7 R7 K
8 R8 L
9 R9 L
10 R10 L
11 R11 K
and i want to display record based on user defind sorting
order e.g.
1 R4 D
2 R5 D
3 R6 K
4 R7 K
5 R11 K
6 R1 S
7 R3 S
8 R2 S
9 R8 L
10 R9 L
11 R10 L
Answer Posted / veeresh kethari
SELECT ROW_NUMBER() OVER(ORDER BY GROUPNAME ASC) ID
,NAME,GROUPNAME FROM REC ORDER BY GROUPNAME
Is This Answer Correct ? | 2 Yes | 0 No |
Post New Answer View All Answers
How we create SQL Server 2005 Reporting Services ? Give me Sample
What is normalization of database? What are its benefits?
how can you attach more than 20 ldf files in sql server
what is the different types of backups available in sql server? : Sql server database administration
What is instead of trigger sql server?
Which are the two editions in which SQL Azure database available?
What is a scheduled job or what is a scheduled task?
What is the use of custom fields in report?
How to transfer a table from one schema to another?
What are the encryption mechanisms in sql server?
How to create a scrollable cursor with the scroll option?
What is named query? : sql server analysis services, ssas
what is the main function of a query parameter?
Explain filtered indexes benefits?
What is in place upgrade in sql server?