Skip to main content
Known Participant
August 13, 2010
Answered

query of queries case sensitive

  • August 13, 2010
  • 1 reply
  • 3469 views

Hi,

I've a question regarding this issue.  I am pulling data from an xml file and dump that data into query of queries then output them.  The problem is when I try to order the query ASC, the upper will be top and the lower will be on the bottom.  Is there a way to sort them before dump data into query?  Or any ways of getting around this?

Thanks.

    This topic has been closed for replies.
    Correct answer Dan_Bracuk

    sql upper() and lower() functions work in Q of Q.

    1 reply

    Dan_BracukCorrect answer
    Inspiring
    August 13, 2010

    sql upper() and lower() functions work in Q of Q.

    Known Participant
    August 16, 2010

    Thank you.

    Edit. Fixed.  Have to put upper() and lower() on the select column and order by.

    Inspiring
    August 16, 2010

    Depending on your requirements, you might want to add a new column to the query, rather than calling upper() on your actual data column... it depends on whether you want your data column to be all upper case (like if you are displaying it).

    So instead of this:

    SELECT col1, upper(col2)

    FROM q

    ORDER BY col2

    Have this:

    SELECT col1, col2, upper(col2) AS col2Sort

    FROM q

    ORDER BY col2Sort


    It doesn't always matter, obviously, but it's handy to keep it in mind.

    --

    Adam