in reply to Re^3: Data with Letter(s) & Number sort query
in thread Data with Letter(s) & Number sort query

Sorry I gave the wrong impression. I added the 0 before numbers less than 1000 manually. I guess I could create such a function but it would be 'nice' to avoid that.
  • Comment on Re^4: Data with Letter(s) & Number sort query

Replies are listed 'Best First'.
Re^5: Data with Letter(s) & Number sort query
by Corion (Patriarch) on Nov 19, 2016 at 12:56 UTC

    Then something like the matching given by Laurent_R below and johngg as well are likely the best approach. Basically, you match your sort keys in the string, then pack or sprintf them into a (fixed-length) prefix to your string, let sort do its thing, and then remove the prefix again.