Results 1 to 3 of 3
  1. #1
    Bob M is offline Advanced Beginner
    Windows 7 32bit Access 2007
    Join Date
    Mar 2013
    Posts
    43

    query to sort surnames

    Hi


    This request is for an 85 year old genealogist friend
    She transcribes local cemeteries and uses access 2003

    She wishes to sort the surnames as follows..............
    .......
    LYONS
    Mac+ whatever
    MACALISTER
    MACEDO
    MACK
    MACKLE
    ..........

    i.e. she wishes to have all the Mac names appearing before the rest of the MA... names
    H
    Any suggestions on how to achieve this using a query?

    Thank you

    Bob M

  2. #2
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,525
    make 3 queries then put them all into a UNION quiery
    Q1 , sort by A-L, .....where left([last],1)<"M"
    Q2 , grab only MAC .....where [LAST] like "MAC*"
    Q3 , sort by M-Z, .....where left([last],1)>"L" and ([LAST] NOT like "MAC*")

    put them all together in the union query
    select * from Q1
    union
    select * from Q2
    union
    select * from Q3

    then just run the union query.
    Last edited by ranman256; 06-05-2017 at 08:13 AM.

  3. #3
    Bob M is offline Advanced Beginner
    Windows 7 32bit Access 2007
    Join Date
    Mar 2013
    Posts
    43
    Thank you very much.....

    Bob M

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

Similar Threads

  1. Replies: 1
    Last Post: 04-07-2014, 02:59 AM
  2. Replies: 3
    Last Post: 02-09-2014, 01:16 PM
  3. sort filter, doesn't sort everything
    By deso in forum Queries
    Replies: 4
    Last Post: 01-25-2013, 05:27 AM
  4. Replies: 3
    Last Post: 01-15-2013, 01:58 PM
  5. Sort Query
    By jice89 in forum Queries
    Replies: 3
    Last Post: 05-06-2011, 05:56 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