Hi,

I apologize if this is an obvious issue, but I just can't see anything to address this. I have a view consisting of nodes titled 1 through 11, set to sort by title ascending. It works great except that instead of the view listing 1-11 in numerical order, it lists 1, 10, 11, 2, etc. Is there any way that I'm missing to get it to list 1-11 as I intend?

Comments

merlinofchaos’s picture

Status: Active » Fixed

There isn't, because titles sort as strings.

If you want numerical sorting, you'll need to sort by a numerical field.

This is a general limitation of how sorting works in SQL and Views just abides by it. If you were writing your own queries, you can do casting on the sort to change how it sorts, but Views doesn't support that (and it makes using indexes impossible anyway, so it's bad for performance).

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.