Results 1 to 2 of 2
  1. #1
    Join Date
    Oct 2003
    Location
    now in UAE, i am an INDIAN.
    Posts
    16

    Unanswered: Sorting alphanumeric code

    Hi,

    I have a table to store the bin codes of a store.
    bin codes are created as below

    A1A1
    A1A2
    A1A3
    ...
    ...
    ...
    ...
    A1B1
    A1B2
    ...
    ...
    ...
    A2A1
    A2A2
    ...
    ...
    ...
    ...
    A10A1
    ...
    ...
    ...
    ...
    B1A1
    B1A2
    ...
    ...

    I want to sort this code as shown above, any idea?

    attaching a script file, which will create the table SMBIN, and insert 400801 bin codes into it.

    thanks and regards
    murali
    Attached Files Attached Files
    TEAM (Together Everybody Achieve More)

  2. #2
    Join Date
    Mar 2002
    Location
    Reading, UK
    Posts
    1,137
    If your using 10g you can use the regular expression support which should make it quite easy.

    If your not then you need to write a function which parses the string and then converts it to a number which can then be sorted. Not easy as Oracle doesnt support isnumber/isalpha, youll have to write your own

    Alan

Posting Permissions

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