Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
divyaram
Posting Yak Master
180 Posts |
Posted - 2010-03-04 : 05:36:23
|
| Hi all, I want sort data in a table first column is in a sort form only, i want to sort second in ascending form irrespective to the first column. How i can do this sorting, is there method in sql server 2008/2005the table structure will be like thisName affiliationApp1 Aff-2App2 Aff-1App3 Aff 2App4 Aff1App5 Aff3App6 Aff2APP7 Aff4Regards,Divya |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2010-03-04 : 05:50:33
|
| What is the expected result?MadhivananFailing to plan is Planning to fail |
 |
|
|
divyaram
Posting Yak Master
180 Posts |
Posted - 2010-03-04 : 06:23:09
|
quote: Originally posted by madhivanan What is the expected result?MadhivananFailing to plan is Planning to fail
The output should be like thisName affiliationApp1 Aff-1App2 Aff-1App3 Aff 2App4 Aff2App5 Aff2App6 Aff3APP7 Aff4Regards,Divya |
 |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2010-03-04 : 06:33:32
|
quote: Originally posted by divyaram
quote: Originally posted by madhivanan What is the expected result?MadhivananFailing to plan is Planning to fail
The output should be like thisName affiliationApp1 Aff-1App2 Aff-1App3 Aff 2App4 Aff2App5 Aff2App6 Aff3APP7 Aff4Regards,Divya
Why do you want to do this?MadhivananFailing to plan is Planning to fail |
 |
|
|
divyaram
Posting Yak Master
180 Posts |
Posted - 2010-03-04 : 06:42:36
|
quote: Originally posted by madhivanan
quote: Originally posted by divyaram
quote: Originally posted by madhivanan What is the expected result?MadhivananFailing to plan is Planning to fail
The output should be like thisName affiliationApp1 Aff-1App2 Aff-1App3 Aff 2App4 Aff2App5 Aff2App6 Aff3APP7 Aff4Regards,Divya
Why do you want to do this?MadhivananFailing to plan is Planning to fail
this is an example for a real time scenario... im adding a column values from other table...there i have to display the columns irrespective the relation ...like if affilation column has been added according to the relation with a userid... but i table i have to show all affilation in ascending order... i think you got my scenario....Regards,Divya |
 |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2010-03-04 : 07:32:57
|
| << im adding a column values from other table...>>Post the full code you are usingMadhivananFailing to plan is Planning to fail |
 |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2010-03-04 : 09:01:37
|
| then i think what you need is a change in join to get the columns in order you want. Anyways as Madhi suggested post your full query without which its difficult for us to suggest------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/ |
 |
|
|
|
|
|