Problem with Order by

Hello everyone

I am an Oracle Developer, and I have a problem with an order by clause.

I have a column varchar2 with numeric values and alfanumeric
For example, I have the following values in the column that I applied the order of: 1,2,3, A, B, C

When I do next
Select column_ord From my_table Order by ASC column_ord;
The result is:
A, B, C, 1, 2, 3

With the following:
Select column_ord From my_table Order by column_ord desc;
The result is:
3,2,1, C, B, A

I Don t udestand this result, because I think that the result should be as follows:
Select column_ord From my_table Order by ASC column_ord;
The result is:
1,2,3, A, B, C


I work with Oralce 10 g ver: 10.2.0.1. and I tried this in Toad and sql * more

Appreciate the help, greetings
Miguel att.

Published by: Miguel Balderas on 30/03/2011-14:04

Hi Miguel,.

Check your session nls_sort setting in this selection: SELECT * FROM v$ nls_parameters;

For your desirable result, try this: ALTER SESSION SET NLS_SORT = "BINARY";

Santiago González

Tags: Database

Similar Questions

  • Problem with order by clause

    Hai all,

    I have problem with order by clause,

    My query is

    "Select number from table1 order number CSA.

    and the output as

    1
    10
    12
    13
    15
    17
    19
    2
    20
    21
    22
    .
    ........

    But if we give the order that it should display below the only good?

    1
    2
    10
    12
    13
    15
    17
    19
    20
    21
    22 ........

    Help me please why it is not displayed as she. and how to make the statement to display as in the second case. Thanks in advance.

    Kind regards
    Uraja

    In your table, the column is VARCHAR2 data type.

    It is a string, even if it is to store numeric values, it will get condemn as strings

    Try the below

    select your_column from table1 order by to_number(your_column) asc 
    

    Published by: JAC on November 19, 2012 16:35

  • Problem with order submit data record for Reporting ATG

    Hi, r. j. Nunes

    I am facing problems with the connection to present newspapers for ATG of the report. The logs for RegistrationFileLogger, SiteVisitFileLogger, UserFileLogger, SegmentFileLogger were successfully getting generated but unable to see the logs for OrderFileLogger during shipment of the order.

    I understand that the/atg/reporting/datacollection/trade/SubmitOrderEventListener of the listener must be notified so that the listeners of corresponding data is called in the order:

    SubmitOrderEventListener-> OrderLogEntryQueueSink-> OrderLogEntryGenerator-> OrderFileLogger

    and newspapers would be written.

    But I'm not able to determine which component notifies the SubmitOrderEventListener by submitting an order.


    Is - this SendFulfillmentMessage component? But SendFulfillmentMessage sends the message to the localdms topic: / local/realization/LocalSubmitOrder on the port of OrderSubmitPort which as component SubmitOrderEventListener listen the subject localdms: / local/realization/LocalSubmitOrder on the DEFAULT port?


    Could someone please clarify.

    Thank you

    Saud

    Hello

    Pipelinelink = "sendFulfillmentMessage" name has been commented to our commercepipeline.xml that we did not use OOTB Presse. Once I removed the comment, sent messages and newspapers to submit order got generated.

    Thank you

    Saud

  • Problem with order?

    I had some problems with a po recipes.
    I create a purchase order, but I can´t see it in some organizations. the ship of the organization is the main element of the organization.

    Sorry, I'm not a functional person so I can't offer much help.

    You have consulted the documentation? -http://docs.oracle.com/cd/B53825_08/current/html/doclist.html#Purchasing_p

    If you still have the same problem, then you can save a SR.

    Thank you
    Hussein

  • Problem with order of clip

    This is a question and request for suggestions.
    I'm very new to using first Pro CS4 using VideoStudio for a long time. But due to a mutitude of bug and constant crashes, I just let fall on her and made the transition to the first.

    I begin to develop projects of AVCHD clips. My camera creates each scene as a file. With VideoStudio I had to use TSmuxeR to merge them into a single clip, otherwise it would just fall more take hours (literally) to start because she wanted to check each hook. When you have hunderds in a project it is a problem.

    Prime Minister handles this much better doing things in the background, but I had some problems with clips are reordered. Maybe my approach is all wrong and I'm open to suggestions.

    For example, I break the clips in segments that relate to a topic and put in a bin. So, in a project, I would have 700 clips into 10 bins with 50 to 100 clips in each location. And I might have a dozen projects which constitute a 'production '. But when I import clips (IE windows) the last clip always happens to be the first imported. It is a common windows problem which I do not know how to move. In any case, when it gets imported I then rearrange clips. Clips from your device name is a time code date as 20100514082312.mts which is unique and you can order by date very easily, but it is really hard to read.

    The problem that I seem to have if I take a bin (that' it'sbeen sort) and drag it to the timeline, the last clip gets always inserted first. I guess that the Prime Minister is to remember the order that the clips had import and not how I trie in the bins.

    Because I tend to move things around a lot, it is a concern to keep deting first clips and then put on the end of the sequence, etc..

    Is there a way to get around this? As do enforcement in the stick of bins, or order the clips by name in the time line or maybe bring imported in the correct order in the first place?

    Or is the way I'm doing this all wrong. I admit it's hard to give up the way I did things in VideoStudio which could impose some bad habits.

    There is something else you can try - select the media and to automate for the timeline. You can tell it to not add transitions and do not overlap, and there are options to overlay the clips in the order of sorting or the order of selection. Try to select clips in the order of your choice.

    If there is something else in the trash you want, like a sequence, you may need to select all, uncheck what you want and then automate.

  • problem with order 40470 themes from adobe for muse

    Hi, I have a problem with a template I received topic of adobe, nr.40470. the problem is that when I preview the page in the browser, the text is on the right side of the chassis. I deleted and reinstalled the model several times but still the same error

    Hi A and C,

    Try to increase the size of the TextBox for a better analysis and share a link to your site.

    Kind regards

    Akshay

  • ORA-00904 ROW_NUMBER, problem with ORDER BY id

    Hello world

    I use Oracle 9i, I use ROW_NUMBER and I got the ORA-00904 because of the ORDER BY identifier.
    SELECT      * 
    FROM      (SELECT c.id_comp, 
              c.nom, 
              c.id_type_comp, 
              c.libelle, 
              c.standard, 
              c.id_comp_std, 
              c.id_comp_grp, 
              (SELECT      t.nom 
              FROM      type_composant t 
              WHERE      t.id_type_comp=c.id_type_comp ) 
              AS      nom_type_comp , 
              (SELECT t.libelle 
              FROM      type_composant t 
              WHERE      t.id_type_comp=c.id_type_comp ) 
              AS      libelletype, 
              (SELECT cc.nom 
              FROM      composant cc 
              WHERE      cc.id_comp=c.id_comp_std ) 
              AS      nom_comp_std, 
              (SELECT ccc.nom 
              FROM      composant ccc 
              WHERE      ccc.id_comp=c.id_comp_grp ) 
              AS      nom_comp_grp, 
              ROW_NUMBER() OVER (ORDER BY nom_type_comp) R 
         FROM composant c) 
    WHERE      nom LIKE '%' 
    AND      R BETWEEN 0 and 200 
    ORDER BY nom_type_comp;
    And here is the error:
     ROW_NUMBER() OVER (ORDER BY nom_type_comp) R FROM composant c)
                                        *
    ERROR at line 25:
    ORA-00904: "NOM_TYPE_COMP": invalid identifier
    Apparently, it takes the pseudonym I use. I tried with the query instead of the alias, and it worked. Is there a way to do it with the alias because I would use a variable with my ORDER BY.

    Any help would be nice!

    Andalusians

    Published by: Guich may 12, 2011 10:40

    You may not use an alias defined on the same query plan.
    The alias must be from a subquery.
    Such as:

    SELECT      *
    FROM      (select my_table.*, ROW_NUMBER() OVER (ORDER BY nom_type_comp) R
             from  (SELECT c.id_comp,
                     c.nom,
                     c.id_type_comp,
                     c.libelle,
                     c.standard,
                     c.id_comp_std,
                     c.id_comp_grp,
                     (SELECT      t.nom
                     FROM      type_composant t
                     WHERE      t.id_type_comp=c.id_type_comp ) AS      nom_type_comp ,
                     (SELECT t.libelle
                     FROM      type_composant t
                     WHERE      t.id_type_comp=c.id_type_comp ) AS      libelletype,
                     (SELECT cc.nom
                     FROM      composant cc
                     WHERE      cc.id_comp=c.id_comp_std ) AS      nom_comp_std,
                     (SELECT ccc.nom
                     FROM      composant ccc
                     WHERE      ccc.id_comp=c.id_comp_grp ) AS      nom_comp_grp
                FROM composant c) my_table)
    WHERE      nom LIKE '%'
    AND      R BETWEEN 0 and 200
    ORDER BY nom_type_comp;
    

    Nicolas.

  • Strange problem with order of cursor on Satellite P100-160

    On my brand new laptop P100-160 with MS Vista Premium, I have an annoying error. Frequently, but without a reason, when I point the cursor on a command and press the touch screen go to the Maximum or to the Minimum size if it's to the Max, but the command is not executed. This happens on all programs, that is to say, words, Excel, games, etc.. I'm away from the United Kingdom and the store where I bought the laptop so resume the shop is not an option.

    Anyone else see this fault or can anyone suggest a solution?

    "It's not a bug, it's a feature!"

    Discover the taskbar when using the touchpad. There is an animated icon beside the clock touchpad. Click twice, and then on the top left device options and on the options again. There, you can spend some time and read about all the flaws of your touchpad - also how you can disable them.

    Have fun.

  • Problem with order by Date

    Apex 3.2

    I have a report based on a collection, but the ranking of start_date and end_date does not work.

    Select

    C002 start_date,

    C003 end_date,

    -start_date to_char (to_date (c002, 'dd.mm.yyyy'), 'dd.mm.yyyy'),

    -End_date to_char (to_date (c003, 'dd.mm.yyyy'), 'dd.mm.yyyy'),

    C004 conversion_factor,

    SI.apskey SMI,

    SI.longdescr Description

    to apex_collections, if udm_si

    where si.siid = c001

    and collection_name = "SMI_INSERT_COL."

    I tried

    C002 start_date,

    C003 end_date

    and put exact in the formatting of column

    I tried

    start_date to_char (to_date (c002, 'dd.mm.yyyy'), 'dd.mm.yyyy'),

    -End_date to_char (to_date (c003, 'dd.mm.yyyy'), 'dd.mm.yyyy'),

    with no formatting of column

    I also tried

    start_date to_char ("c002, ' dd.mm.yyyy")

    but I get an error

    error report:

    ORA-01722: invalid number

    Gus

    Some previous threads please refer to "-" the origin of this. Try to split the "-"s: ".

    ' ': apex_item.display_and_save (2, c002)

  • Hi, I bought acrobat adobe pro ms with order number: 12287735659 but I have not received the download link and the serial numbers of adobe and had this message there is a problem processing your order, please contact our Service team at the 800 448 custom

    Hi, I bought acrobat adobe pro ms with order number: 12287735659 but I have not received the download link and the serial numbers of adobe and had this message there is a problem processing your order, please contact our Service team customer to 800 448 1642 for assistance. my credit card is already loaded, but not received numbers.please series suggest

    Hi Kunal,

    If the problem still persists, can you please contact the support for this issue through https://helpx.adobe.com/support.html#/top_products.

    Please do not hesitate to me message in person if assistance is needed.

    Concerning

    Stéphane

  • Hello, I had a problem with my band. It does not really suppose he numbered scenes everything in order and he has so far in until I missed an and changed for the good order. But now when I go back to where I left and I have create a new scene

    Hello, I had a problem with my band. It does not really suppose he numbered scenes everything in order and he has so far in until I missed an and changed for the good order. But now when I go back to where I left and I have create a new scene number come up as * it and I need to change personally. is their any way I can change it to order normally?

    Hello

    You can manage this through the "Manage scene numbers" option in the menu 'Production '.

    There is a setting in this dialog box to assign scene numbers automatically to the new scenes.

  • No e-mail the order after problem with processing status.

    I ordered and received a confirmation email that says there is a problem with the processing system. He said as I would receive an email with the status of my order within 24 hours, and no such email arrived after more than a day. I Don t know how to proceed and access the product.

    Hello Daniela,

    I am able to see an active subscription on your e-mail address, please check if the problem is resolved?

    Kind regards

    Akshay

  • Hello. I have a problem with the payment process when trying to buy the plan of creative photography of Cloud (one year). the error is: there was a problem processing your order, please contact our Service team customer care for assistance. AfricaBa North

    Hello. I have a problem with the payment process when trying to buy the plan of creative photography of Cloud (one year).

    the error is: there was a problem processing your order, please contact our Service team customer care for assistance. Middle East & North AfricaBahrain: 80081097Egypt: 08000000447Jordan/Kuwait/Lebanon/Qatar/Yemen: English + 44 207 365 0735Jordan/Kuwait/Lebanon/Qatar/Yemen: Arabic/French + 44 203 564 4145Oman: 80077173Saudi Arabia: 8008446638Tunisia, the Morocco and the Algeria: + 33 United Arab Emirates 157324642United: 80004443085Commonthwealth of independent States (CIS): + 44 207 365 0735

    Help me please to solve this problem. I need my lightroom immediately)

    Hi mohamed,.

    Please see the link below to buy the plan of photography:

    Pricing plans and creative Cloud membership | Adobe Creative Cloud

    In case you still have question, please contact sales at Adobe team.

    Adobe Middle East and North Africa

    Kind regards

    Sheena

  • I'm having a problem with my redemption code.  It says product not activated.  I ordered 12 online adobe photoshop/first elements.  Contact seller.  They said contact adobe chat. I was wondering if anyone can help? Thank you

    I'm having a problem with my redemption code.  It says product not activated.  I ordered 12 online adobe photoshop/first elements.  Contact seller.  They said contact adobe chat. Chat is now closed.  I was wondering if anyone can help? Thank you

    Using redemption code

    http://helpx.Adobe.com/x-productkb/global/redemption-code-help.html

    If you have purchased the software and reimbursement codes are coming as invalid then the seller needs to address that.  If you were able to acquire the serial number by exchanging the redemption code, then follow the advice of the seller and you contact Adobe support via chat (when available).

    Chat support - the link below click the still need help? the option in the blue box below and choose the option to chat...
    Make sure that you are logged on the Adobe site, having cookies enabled, clearing your cookie cache.  If it fails to connect, try to use another browser.

    Serial number and activation support (non - CC) chat
    http://helpx.Adobe.com/x-productkb/global/Service1.html ( http://adobe.ly/1aYjbSC )

  • Problems with our order processing system

    I just bought Adobe Lightroom and requested immediate download, even if after paying I told me that "we currently live problems with ourorder processing system. "Your order is reviewed and processed soon."

    A bit disappointed as I wanted him to dive in full and begin learning lightroom.

    Rather than waiting for the processing order, it would be wise to download the trial version and then make a serial number that can be used to convert the path to a full version?

    There is no downside to using the trial version at the beginning and by simply entering a serial number (assuming that's what I want)?

    Indeed, your assertion is correct, download the trial version and when you get a serial number you can enter it, versions is the sam as the licensed version other than his lifeespan to 30 days.

    I remember you can whenever you launch the trial version to enter a serial number.  Since the trial lasts for 30 days, you should have a number entered expires (!).  Even if no catalog or have created still works fine when you finally get the serial number.

Maybe you are looking for