0
votes

Is it possible to do a case insensitive sort in SQL2? The following statement sorts the results like [c, b, a, C, B, A] and we desire [c, C, b, B, a, A].

SELECT * FROM [nt:unstructured] WHERE [sling:resourceType] = 'photo' ORDER BY [photoTitle] desc

Thanks in advance for your help!

1

1 Answers

1
votes

Ok, I found a solution that works for me. Just add the lower function to the column name like this:

SELECT * FROM [nt:unstructured] WHERE [sling:resourceType] = 'photo' ORDER BY LOWER([photoTitle]) desc

Better solutions are welcome!