Skip to Main Content

APEX

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Order By clause not working

rbelliveauSep 25 2013 — edited Sep 26 2013

I have a very basic SQL statement that I am running on a simple three column table. I simply want to select two of the three columns basing the selection on one column and ordering by the other. I am using Release 9.2.0.1.0 and I have tried using SQL Plus as well as Toad 10.6 and the results are the same in both. My problem is that even though I am using an Order By clause the results are not being sorted. I've written countless statements and never had an issue with the Order By clause before. I'm perplexed.

SQL Statement Executed:

Select COL3 From Table1 Where COL2=1 Order By COL3;

Result:

Dxxxxx                                                                          
Nxxx Mxxx/Cxxxx Cxxx                                                           
Nzzzz Ezzzz  
Oxxxxxxxxxx Exxxx                                                                 
Rxxxxxxxxx Exxxx                                                              
Sxxxxxxx Exxxx                                                              
Sxxxxxx Hxxx                                                                
gxxxxxxx

Note that I replaced all but the first letter of each word woth alterate letters. There is nothing remarkable about the table:

SQL Statement Executed:

Desc Table1;

Result:

TABLE Table1
Name                                      Null?    Type                       
----------------------------------------- -------- ----------------------------
COL1                                                   NUMBER                     
COL2                                                   NUMBER                     
COL3                                                   VARCHAR2(255)

This post has been answered by Ramesh P Oracle APEX Developer on Sep 25 2013
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Oct 24 2013
Added on Sep 25 2013
3 comments
1,638 views