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.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 Order By question

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2001-07-26 : 08:28:53
Kevin writes "Hi,
Given the following sql I can get an alpabetized list of all accountants in my tblBusiness:

- select busName,bHyperLink, bMember, category from tblBusiness where category=1 order by busName asc

My Problem:
I want my list to first show alphabetically accountants that are either members(bMember=true) or hyperlinked(bHyperLink=true), then show the rest of the accountants alphabetically after that.

So I would really like my sql to be something like this:
- select busName,bShowLinks, bMember, category from tblBusiness where category=1 order by [if bHyperLink=true and/or bMember=true then show up alpha. at top of list], busName asc

Is it possible to get something like this to work?

Thanks,
Kevin"
   

- Advertisement -