Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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


Please Help Members By Posting Answers For Below Questions

How adventureworkslt tables are related?

986


What is the difference function and stored procedure?

1118


What is nonclustered index on computed columns?

1000


Explain about nested stored procedure?

1084


Which tcl commands are available on the sql server?

1143


What is the recovery model?

1063


You schedule a job to run every minute what will happen if the first job runs more than 1 min? Will the second instance of the job start?

1101


what are the core components of SSRS?

137


What is the full form of dql?

1028


How to retrieve error messages using odbc_errormsg()?

1112


Can you explain the disadvantages/limitation of the cursor?

1059


What is failover clustering overview?

1145


what is a default tcp/ip socket assigned for sql server? : Sql server database administration

1122


Explain time data type in sal server 2008?

972


What are cursors stored procedures and triggers?

1089