Results 1 to 3 of 3
  1. #1
    5 Star Lounger
    Join Date
    Mar 2001
    Posts
    989
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Union Query with false sort (2003)

    I believe there is a way, using a Union query, to create a 'false' sort order for a column. That is, to sort a column for a combo-box such that a specific item (or two) will appear at the top of the list and the rest will remain sorted alphabetically. Does anyone recall this? Thanks, Andy.

  2. #2
    Gold Lounger
    Join Date
    Jun 2001
    Location
    Crystal Beach, FL, Florida, USA
    Posts
    3,436
    Thanks
    1
    Thanked 34 Times in 34 Posts

    Re: Union Query with false sort (2003)

    For example, let's suppose you had a list of companies which you normally presented sorted by CompanyName. But suppose you wanted all the companies in "New York" to be on top. Your SQL would include this ORDER BY clause:

    ...ORDER BY City = "New York", CompanyName
    Mark Liquorman
    See my website for Tips & Downloads and for my Liquorman Utilities.

  3. #3
    5 Star Lounger
    Join Date
    Mar 2001
    Posts
    989
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Union Query with false sort (2003)

    Thank you. I was referring to a single field, but Access enabled the expresion 'ORDER BY City="London", City'.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •