MySQL order using varchar field -
i have database varchar field on wish order records. 2 of possible contents of field "applicant-approved" , "applicant-declined". both fields of identical length , first 10 characters identical. yet mysql insists on sorting "declined" records ahead of "accepted" records. examined in hexadecimal, "accepted" field less "declined" field. how can overcome?
i dont know why doing should work.
order appfield, right(left(appfeild,11),1)
Comments
Post a Comment