DBAsupport.com Forums - Powered by vBulletin
Results 1 to 2 of 2

Thread: Sort characters in a string

  1. #1
    Join Date
    Oct 2003
    Posts
    1

    Question Sort characters in a string

    All,

    I have a varchar(10) field in a table. I would like to sort the characters within a given string, in this field, in ascending order, using a SQL query.

    i.e. If the field has "airlines" ... I would like to have "aeiilnrs" as the result (from my SQL query).

    How can I do this?

    Thank you for your time.

  2. #2
    Join Date
    May 2002
    Posts
    2,645
    Sorting homework problem? Impress your teacher by using bubble sort and PL/SQL collections.

    Bubble sort algorithm:
    http://www.cs.princeton.edu/~ah/alg_...ubbleSort.html

    Collections:
    http://download-west.oracle.com/docs...olls.htm#20425

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