Skip to main content
tclaremont
Inspiring
December 1, 2008
Question

Case Insensitve Ordering

  • December 1, 2008
  • 2 replies
  • 354 views
My CFQUERY is working fine, and has for years. I am ordering my lastname. Just recently a client joined the list with a last name that starts with a lower case letter. As many of you know, lowercase appears at the end in a database sort. This really screws up my reports.

I tried using ORDER BY lower(lastName) and ORDER BY UCASE(lastName) but neither of those solutions work. They throw errors. What am I missing here? What is the best way to deal with this?
    This topic has been closed for replies.

    2 replies

    tclaremont
    Inspiring
    December 1, 2008
    I see. I was adding lower(lastname) to my order by statement. Using the alias solved a couple of problems. Thanks Dan.
    Inspiring
    December 1, 2008
    add lower(lastname) somealias to your select clause and order by the alias.