Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> RE: order by question

RE: order by question

From: Mercadante, Thomas F <thomas.mercadante_at_labor.state.ny.us>
Date: Wed, 30 Mar 2005 09:17:27 -0500
Message-ID: <C9995D8C5E0DDA4A8FF9D68EE666CE0704AC03CB@exchsen0a1ma>


What version of Oracle? When I do this (on 9.2.0.4) I get:

Cat
Pen
cat
pen

-----Original Message-----

From: geraldine_2_at_comcast.net [mailto:geraldine_2_at_comcast.net] Sent: Wednesday, March 30, 2005 9:07 AM
To: oracle-l_at_freelists.org
Subject: order by question

Hi,
I have the following data in a table:

SQL> select * from test order by name;
NAME



pen
Pen
cat
CAT I want to order the records in alphabetically order first, followed by upper case and then lower case.

The result should be :
CAT
cat
Pen
pen

I tried order by upper(name) but that did not yield the right result.

Can someone shed some light.

Thanks.

Geraldine
--

http://www.freelists.org/webpage/oracle-l
--

http://www.freelists.org/webpage/oracle-l Received on Wed Mar 30 2005 - 09:21:13 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US