How can I order a column of numbers taking into account the digits and not the numeric order?

How can I order a column of numbers taking into account the digits and not the numeric order?

sehp2012sehp2012 Posts: 1Questions: 1Answers: 0

I am trying to order a catalog of accounts, in my database the data type of the code is text but I can not achieve my goal, I have tried type, stype, sorting plugins, I have combined in the field with blank spaces but I can not get it.
I want this result
1
11
1101
110101
2
21
3

but as much as I try, I always get
1
2
3
11
21
1101
110101

Answers

  • colincolin Posts: 15,240Questions: 1Answers: 2,599

    Hi @sehp2012 ,

    It's recognising the column as numeric so it's doing a number ordering. You can over-ride that by saying it's a string in columns.type,

    Cheers,

    Colin

This discussion has been closed.