Results 1 to 3 of 3
  1. #1
    Middlemarch is offline Competent Performer
    Windows 10 Access 2019
    Join Date
    Mar 2015
    Posts
    340

    Handling zeros differently

    Is is possible to write a query that puts any 0's last, but keeps >0 in ascending numeric order ?

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,815
    Calculate another field that assigns a value of 1 to the non-zero records and 2 to the zero records.

    SELECT * FROM table ORDER BY IIf(field = 0, 2, 1), field;
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #3
    Middlemarch is offline Competent Performer
    Windows 10 Access 2019
    Join Date
    Mar 2015
    Posts
    340
    Thanks June that did it nicely.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 3
    Last Post: 03-12-2018, 07:00 PM
  2. Replies: 8
    Last Post: 04-18-2014, 02:24 PM
  3. Sub Forms work Differently?
    By djclntn in forum Forms
    Replies: 1
    Last Post: 12-06-2012, 12:51 PM
  4. Two people see same file differently
    By jeffreydennis in forum Access
    Replies: 12
    Last Post: 06-11-2012, 09:50 AM
  5. Replies: 3
    Last Post: 05-05-2012, 12:25 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums