JohnEOasis
Programmer
I have a field that I need to sort on.
That field that could be a number or text.
It currently sorts numbers as 1 10 2 3 30 31 32 4 5 6 7... I need them to sort 1 2 3 4 5 6 7 8 9 10 11 etc...
Is there a way to do this with a regular expression? Such as adding x number of spaces to the number i.e.
That field that could be a number or text.
It currently sorts numbers as 1 10 2 3 30 31 32 4 5 6 7... I need them to sort 1 2 3 4 5 6 7 8 9 10 11 etc...
Is there a way to do this with a regular expression? Such as adding x number of spaces to the number i.e.
Code:
{pseudocode}
if ISNUM{SQL field}
Select numbercount = {SQL field length}
Case numbercount = {single digit}
add 3 spaces
Case numbercount = {double digit}
add 2 spaces
Case numbercount = {tripple digit}
add 1 space
Default
add none