Re: order by question

  • From: John Clarke <jclarke@xxxxxxxxxxxxxxx>
  • To: geraldine_2@xxxxxxxxxxx, oracle-l@xxxxxxxxxxxxx
  • Date: Wed, 30 Mar 2005 09:24:18 -0500

I get=20

CAT
Pen
cat
pen

on 9.2.0.6 when I simply order by name, but I *think* that this will do =
what you want:

select * from=20
(select * from test
order by name)
order by upper(name)
/

----- Original Message -----
From: geraldine=5F2@xxxxxxxxxxx
To: oracle-l@xxxxxxxxxxxxx
Sent: Wed, 30 Mar 2005 09:07:00 -0500
Subject: order by question


> Hi,
> I have the following data in a table:
>=20
> SQL> select * from test order by name;
> NAME
> ----
> pen
> Pen
> cat
> CAT
>=20
>=20
> I want to order the records in alphabetically order first, followed by=
 upper
> case and then lower case.
>=20
> The result should be :
> CAT
> cat
> Pen
> pen
>=20
> I tried order by upper(name) but that did not yield the right result.
>=20
> Can someone shed some light.=20
>=20
> Thanks.
>=20
> Geraldine
> --
> //www.freelists.org/webpage/oracle-l
>=20

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

Other related posts: