Results 1 to 4 of 4
  1. #1
    MattLewis is offline Novice
    Windows 10 Access 2016
    Join Date
    Nov 2016
    Posts
    17

    order by alias name


    Does Access SERIOUSLY not support an order by clause that uses a column alias name?????

    Code:
    SELECT Job, SortableJobNumber(Job) AS [Job Number]
    FROM Jobs
    ORDER BY [Job Number];
    Access is asking me to enter a parameter value for [Job Number] ?????????? This is basic SQL 101 stuff here, What the ever-loving Christ is wrong with Access?

  2. #2
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,550
    Access doesn't care about the alias, only humans do.
    So put the real field name.

  3. #3
    JoeM is offline VIP
    Windows 7 32bit Access 2007
    Join Date
    Jun 2012
    Posts
    3,904
    Or you can just use the field reference. Since it is the second field in your Select query, you could just use:
    Code:
    ORDER BY 2;

  4. #4
    aytee111 is offline Competent At Times
    Windows 7 32bit Access 2013 32bit
    Join Date
    Nov 2011
    Location
    Nomad
    Posts
    3,936
    Please keep this forum clean, hopefully someone will edit his post.

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

Similar Threads

  1. Replies: 2
    Last Post: 03-07-2016, 05:02 PM
  2. duplicate alias ??
    By dickk in forum Access
    Replies: 5
    Last Post: 06-07-2012, 06:16 AM
  3. Alias Help
    By shexe in forum Queries
    Replies: 3
    Last Post: 09-07-2010, 12:28 PM
  4. DocName alias and TransferSpreadsheet
    By thart21 in forum Programming
    Replies: 1
    Last Post: 04-27-2010, 11:11 AM
  5. user alias
    By ukgooner in forum Queries
    Replies: 0
    Last Post: 08-25-2009, 05:03 AM

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