oracle - Orace SQL - sorting with all upper case first -


what if wanted sorting have upper case first lower case?

a b c d b c d 

i tried searching net , find sorting make it

a b b c c 

etc..

but wanted upper case values sorted first lower case ones.

any idea? thanks

use case expression conditionally order column, based on upper or lower case. order original column.

select * tablename order case when upper(col) = col 1 else 2 end, col 

note: ordering above works when there 1 character in string or when entire string either upper case or lower case.


Popular posts from this blog

php - How should I create my API for mobile applications (Needs Authentication) -

5 Reasons to Blog Anonymously (and 5 Reasons Not To)

Google AdWords and AdSense - A Dynamic Small Business Marketing Duo