View Full Version : Query using Asc()


captnk
05-06-2002, 05:32 AM
I was given some help a while vack by "Raskew",but unfortunately Iam still having a problem with this.

I have a column,with single alpha characters in upper and lower case,eg:
"W" "w","P" "p" etc.
I need to be able to extract data using say just the lower case "w" and change it to a different letter,for easier id.

I have tried using:
Iif(Asc(left([columnname],1))=115,1,0)
That should find"M" (Asc115) but it still finds both cases


Obviously i am missing the point somewhere,and any help would be appreciated
Regards
Captnk

rocket
05-06-2002, 11:48 AM
ASC([x])....Returns an Integer representing the character code corresponding to the first letter in a string.

I do not think you need to specify the left 1 as the function already assumes this.

captnk
05-06-2002, 03:51 PM
Tks Rocket.
Yep u r right about that.

I also got it!
The ascii Table I was using as a reference was in fact giving the Oct value of the Ascii code.
I tried a new table and used the Dec code and it works fine.
How Damn confusing
Thanx