DBAsupport.com Forums - Powered by vBulletin
Page 2 of 2 FirstFirst 12
Results 11 to 14 of 14

Thread: Sorting a query in ASCII code

  1. #11
    Join Date
    Feb 2002
    Location
    Dallas , Texas
    Posts
    158
    FOR ID

    Hi,

    Which version of Oracle are you using...

    I am getting the result u want from simple order by clause.

    SQL>select * from test_db
    2 order by 1;
    A
    ----------
    11a
    1a2
    21a
    aaa
    ana
    bbb
    bis
    ccc
    raul

    9 rows selected.

    Take Care.

  2. #12
    Join Date
    Apr 2001
    Location
    Czechia
    Posts
    712
    Looks like EBCDIC sorting order.
    Try "ALTER SESSION SET NLS_SORT=BINARY".
    Ales

  3. #13
    Join Date
    May 2002
    Posts
    6

    Thumbs up Zanx

    Hi,
    It works, not for the type that you specify; it
    works for (we're from Spain):

    NLS_SORT = eec_euro

    Thanks a lot!!!!


  4. #14
    Join Date
    Aug 2000
    Location
    Belgium
    Posts
    342
    Try this

    select *
    from MyTable
    order by NLSSORT(MySortColumn,'NLS_SORT = BINARY')

    Not sure it will give the good result.
    just try it.

    Regards
    Gert

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Click Here to Expand Forum to Full Width