Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 551051
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T11:21:10+00:00 2026-05-13T11:21:10+00:00

I am sure that this must be quite a common problem so I would

  • 0

I am sure that this must be quite a common problem so I would guess that Microsoft have already solved the problem. My Googling skills are just not up to scratch. I have a field that I want to order by, it is a varchar field, for example

  • Q
  • Num 10
  • Num 1
  • A
  • Num 9
  • Num 2
  • F

Now I would expect the result to be

  • A
  • F
  • Num 1
  • Num 2
  • Num 9
  • Num 10
  • Q

But it is not. It is as follows (Notice that Num 10 comes after Num 1 and not Num 9 as expected)

  • A
  • F
  • Num 1
  • Num 10
  • Num 2
  • Num 9
  • Q

Now I know the reason for this so you don’t need to explain 🙂 But I can’t remember how to solve it or if there is a nice flag or command that I can use to get it right.

EDIT:

The examples above are just an example. The column could contain any value. Any combination of letters and digits. Is there a way to sort this humanly alphabetically instead of ASCII value alphabetically?

EDIT 2:
Thanks for the answers so far. I am talking about ANY arbitary data. If it were in a fixed position or preceded by something then it would easy and I wouldn’t be asking. I am asking for a general solution to this problem with ANY arbitary data. Not patterns, no rules, no nothing.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T11:21:11+00:00Added an answer on May 13, 2026 at 11:21 am

    This is an age old problem of Ascii Sort Order vs. Natural Sort Order

    See Sorting for Humans : Natural Sort Order for further details.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm sure this must be a common problem. I've got a class that in
Im sure this will be a simple one but have a project that started
Considering this code, can I be absolutely sure that the finally block always executes,
This is really stumping me today. I'm sure its not that hard, but I
I'm sure this is a subject that's on most python developers' minds considering that
I'm not sure how to approach this: I want a TreeView that will display
For anyone that remembers the protocol Avatar, (I'm pretty sure this was it's name)
Ok, this is a dumb thing that I'm sure I've done dozens of times
I want to make sure that a set of functions have the same signature
I need to make sure that user can run only one instance of my

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.