I'm assuming you want to sort the number as a number, followed by the alpha bit when it exists, and the extra "54" is an error.
On that basis, you need to split your fields and then recombine them. For the examples you give, you could try something like
Code:
If Length({your.field}) = 1
then "0" & {your.field}
else {your.field}
If the data is more complex, you might need to use the
Right command to get the last character and test it for being numeric or not numeric, etc.
It always helps to give your Crystal version - 8, 8.5, 9, 10, 11 or whatever. Methods sometimes change between versions, and higher versions have extra options.
![[yinyang] [yinyang] [yinyang]](/data/assets/smilies/yinyang.gif)
Madawc Williams (East Anglia, UK). Using Crystal 11.5 with SQL and Windows XP
![[yinyang] [yinyang] [yinyang]](/data/assets/smilies/yinyang.gif)