Re: Selecting against values outside the ASCII range!!!

From: Andrew Lowe <agl_at_wht.KILLSPAM.com.au>
Date: 06 Apr 2004 17:26:40 GMT
Message-ID: <Xns94C42311C204Caglwhtcomau_at_211.29.133.50>


janik_at_pobox.sk (Jan) wrote in
news:81511301.0404060705.7d0d06fe_at_posting.google.com:

> Since "col3" is a Char datatype then
>
> In this case:
> select * from table1 when col3 = 1
>
> 1 is a number so an implicit conversion is done. Values in "col3" are
> tried to be converted into a number type. If there in col3 is at least
> one non-number value, it raises that error.
>
> You can fix it by
>
> select * from table1 when col3 = '1'
>
>
>
> Jan
>
Jan,

            I've tried that as well, it doesn't work. Doing '1' would indicates that the thing inside the quotes is No 49, the 49th entry, in the ASCII table whilst I have No 1, 3, 9, 11 etc in the ASCII table, values that can't be represented on the keyboard ie I can't represent them between the quotes. On another forum where I asked this question, someone suggested that I wrap the values in chr() and ascii(), depending which way I am going. I've done thins and things are now fine.

            Thanks for taking the time to reply,

            Andrew Lowe Received on Tue Apr 06 2004 - 19:26:40 CEST

Original text of this message