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 / alka
select id,name, groupname from #temp1
Order by groupname,name
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
What are cursors and when they are useful?
Explain external key management in sql server 2008
What do you mean by authentication modes in sql server?
Delete duplicate rows without using rowid.
Explain how to use linked server?
What is triggers and stored procedures?
What is the difference between sdf and mdf?
Explain how to maintain a fill factor in existing indexes?
What is your recommendation for a query running very slow? : sql server database administration
what is a live lock? : Sql server database administration
What is store procedure?
What is the difference between createstatement and preparedstatement?
Explain indexes disadvantages?
Can we use pragma autonomous_transaction in trigger?
What is outer join in sql server joins?