• scarr030 (10/25/2016)


    ...pulling (in short) any record that had a result_text > '7.9%'. The field 'result_text' is a varchar field. It was pulling anyone between 8.0 and 9.9, but excluding anyone above that number. My question is: why were the results that were previously showing between 8 and 9.9? Is it because you can't really have a 'greater than' for text? If so, then why was it able to pull that range, but seemingly nothing 10 and above?

    if you're using less than or greater than comparisons with character data, then it's comparing ASCII values of the result_text data from left to right. since ASCII('7') = 55 and ASCII('1') = 49, 49 is less than 55 not greater.