Results 1 to 6 of 6

Thread: Sorted!

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    May 2000
    Location
    London Occupation: Desktop Developer
    Posts
    141

    Question

    I am trying to find an algorithm that will sort a field I have that stores account codes. The problem I have is that the codes have both numeric and alpha numeric data in them. Eg ABC02;ABC01;1OA29;1OA30 so the algorithm needs to be able to look at each character so that the codes are sorted in logical order. Results should be ==> 10A29;1OA30ABC01;ABC02. I am sure that someone has written this before???

  2. #2
    Fanatic Member
    Join Date
    Mar 2000
    Location
    That posh bit of England known as Buckinghamshire
    Posts
    658
    I can't see a problem with that.

    1 is less than A, so it would be sorted in that order anyway.

    Good Luck.
    Iain, thats with an i by the way!

  3. #3

  4. #4
    Guest
    in ascii, the 1 is less than a isn't it, maybe use that...

  5. #5

    Thread Starter
    Addicted Member
    Join Date
    May 2000
    Location
    London Occupation: Desktop Developer
    Posts
    141

    Sorted

    The data is keyed in by the users. The data is stored as a parent child relationship so in actual fact ABC02 can have a number of associated accounts which will be numbered as ABC01;ABC02. Likewise 1OA29 will have 1OA2901 and 1OA2902..., I have to come up with a report that shows for each parent the range of associated accounts, I was going to use first and last to retrieve the data in a query and hence I need to sort it correctly. Possibly I am approaching this incorrectly not sure...

  6. #6

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