I think you want substr($a, 0, 2) instead of substr($a,1)
In reply to Re: substr sort ?? by guha in thread substr sort ?? by Anonymous Monk