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 |
|
gagani
Posting Yak Master
112 Posts |
Posted - 2011-10-17 : 14:13:16
|
| Hi,I want to joinselect branchid, branchname from salesbranches where active = 1 order by branchnameselect branchid, branchname+'*' from salesbranches where active = 0 order by branchnamefirstly, I need active branches to come in order, then inactive branches to come in order |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2011-10-17 : 14:16:19
|
| [code]select branchid, branchname + case when active = 0 then '*' else '' endfrom salesbranches order by active desc,branchname[/code]------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/ |
 |
|
|
gagani
Posting Yak Master
112 Posts |
Posted - 2011-10-17 : 14:29:14
|
| so great of you. Thank you so muchI did not find any option to mark it as complete |
 |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2011-10-17 : 14:31:01
|
| no need. just append [Solved] to topic heading and that should be it------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/ |
 |
|
|
|
|
|