Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

query of queries case sensitive

New Here ,
Aug 13, 2010 Aug 13, 2010

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.

3.3K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

LEGEND , Aug 13, 2010 Aug 13, 2010

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

Translate
LEGEND ,
Aug 13, 2010 Aug 13, 2010

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

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Aug 16, 2010 Aug 16, 2010

Thank you.

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

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Aug 16, 2010 Aug 16, 2010
LATEST

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

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources