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

Popular posts from this blog

c++ - CryptStringToBinary API behavior -

c++ - Correct method for redrawing a layered window -

java.util.scanner - How to read and add only numbers to array from a text file -