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 triggers long term care?
What kind of problems occurs if we do not implement proper locking strategy?
You notice that the transaction log on one of your databases is over 4gb the size of the data file is 2mb what could cause this situation, and how can you fix it?
What is set nocount on?
What the different components of Replication and what is their use?
What is CTE in SQL
Explain few of the new features of sql server 2008 management studio
What are the properties of the transaction?
How do I open port 1433?
Can you give me some DBCC command options?(Database consistency check) - DBCC CHECKDB - Ensures that tables in the db and the indexes are correctly linked.and DBCC CHECKALLOC - To check that all pages in a db are correctly allocated. DBCC SQLPERF - It gives report on current usage of transaction log in percentage. DBCC CHECKFILEGROUP - Checks all tables file group for any damage.
How to create a dml trigger using create trigger statements?
Can we use custom code in ssrs?
What do you understand by recursive stored procedures?
Explain the steps needed to create a scheduled job?
what are different types of backups available in sql server? Given a particular scenario, how would you go about choosing a backup plan? : Sql server database administration