We just came across a issue that took one of our developers a longer time to figure out and is regarding the "order by" syntax in use with a Oracle Database 10g R2.
When using a:
SELECT myname FROM mydb ORDER BY myname
and you have different cases in the "myname" field (Example: Oracle, oranges, adventure, Business) then the above query would give you a result that would look like this:
Business
Oracle
adventure
oranges
As you can see the word "adventure" is at the "end" of all the values that are writing in upper case. The reason for this is because as by default the Oracle Database is case sensitive.
To get the correct order you will have to wrap the "Order By" with the lower() function, like:
SELECT myname FROM mydb ORDER BY lower(myname)

