Home » SQL & PL/SQL » SQL & PL/SQL » Sorting alpha numeric data (oracle 10g)
Sorting alpha numeric data [message #405565] Thu, 28 May 2009 07:15 Go to next message
ramesh55.sse
Messages: 262
Registered: December 2008
Location: Hyderabad
Senior Member
SQL>SELECT * FROM test;

X
----------
1
100
2
999
50
9
APPLE
BANANA
2000
CARROT
I wanted to arrange the data in the following order please help me

X
----------
APPLE
BANANA
CARROT
1
2
9
50
100
999
2000
Re: Sorting alpha numeric data [message #405584 is a reply to message #405565] Thu, 28 May 2009 08:03 Go to previous messageGo to next message
vamsi kasina
Messages: 2112
Registered: October 2003
Location: Cincinnati, OH
Senior Member
Just a thought...
If there are only positive numbers and want to treat lower and upper case as the same, then
order by translate(upper(X), 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
                           , '00000000000000000000000000'), upper(X)
By
Vamsi
Re: Sorting alpha numeric data [message #405589 is a reply to message #405565] Thu, 28 May 2009 08:11 Go to previous messageGo to next message
Michel Cadot
Messages: 68737
Registered: March 2007
Location: Saint-Maur, France, https...
Senior Member
Account Moderator
From (very few of) your previous topics:
Michel Cadot wrote on Mon, 25 May 2009 06:14
Still not able to read the documentation?
Still not able to search?
Still not able to follow guidelines?

Regards
Michel


Michel Cadot wrote on Sat, 23 May 2009 08:56
I truly believe you have to think about changing your profession you surely have some skills in something but obviously not here.

Regards
Michel


Michel Cadot wrote on Tue, 26 May 2009 07:37
Still unable to follow the guidelines?
Still unable to read the documentation?
...
I strongly recommend you to change job and find something that is in your skills which is obviously not something related to computer science.

Regards
Michel


Re: Sorting alpha numeric data [message #405591 is a reply to message #405565] Thu, 28 May 2009 08:15 Go to previous messageGo to next message
BlackSwan
Messages: 26766
Registered: January 2009
Location: SoCal
Senior Member
DNFTT
http://www.acronymfinder.com/Do-Not-Feed-the-Trolls-(newsgroups%3b-don%27t-respond-to-provocation%3b-flamers)-(DNFTT).html

[Updated on: Thu, 28 May 2009 08:29] by Moderator

Report message to a moderator

Re: Sorting alpha numeric data [message #405593 is a reply to message #405591] Thu, 28 May 2009 08:33 Go to previous message
Michel Cadot
Messages: 68737
Registered: March 2007
Location: Saint-Maur, France, https...
Senior Member
Account Moderator
He is not a troll he is just a stubborn narrow-minded dumb. Mad

Regards
Michel

[Updated on: Thu, 28 May 2009 08:36]

Report message to a moderator

Previous Topic: removing duplicate records (merged 2 )
Next Topic: Onlogon Database triggers
Goto Forum:
  


Current Time: Fri Feb 14 10:01:02 CST 2025