I am still trying to understand what you are trying to do? I guess you need to know that SQL as a language is case insensitive and so order by clause will always work.