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 / archana

Select * from #emp Order by id,Groupname

Is This Answer Correct ?    0 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Beginning with sql server version 7 0, a new enhanced data type nchar was added what type of data is supported with this data type?

965


Why do we use non clustered index?

1010


Explain the ways to controlling cursor behavior?

876


Do you know clustered and non-clustered index?

933


Can two tables share a primary key?

952


What is query cost in sql server?

937


How many categories of data types used by sql server?

969


What is the difference between nvl and nvl2?

898


Can we insert data if clustered index is disabled?

893


Explain what are the basic functions for master, msdb, model, tempdb databases?

913


List some of the rules that apply to creating and using a ‘view’

817


What happens if you insert a duplicate key for the primary key column in ms sql server?

935


What are a scheduled jobs or what is a scheduled tasks?

850


What does sql server mean?

975


What purpose does the model database server?

1055