Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations GregLocock on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

Problem with high ASCII values

Status
Not open for further replies.

kranser

Computer
Dec 19, 2002
1
Hi

I'm having a problem with high ASCII values.

When I run the query:
select * from TAB1 where (FIELD1 >= '01' and FIELD2 > '¡')

where ¡ is ASCII 254 (or ASCII 65534, it doesn't matter which), I get all records in the table. I should get none, as FIELD2 never contains an ASCII value higher than 126!

It seems like the ¡ value is being intpreted as NULL.

Can anyone help me resolve this? The Database uses collation SQL_Latin1_General_CP1_CI_AS and Sort Order 52.

Thanks,
Kranser.
 
Replies continue below

Recommended for you

I've seen something that sounds similar. The interface that I use to connect to a DB2 database sometimes returns an error stating that I'm trying to pass an unrecognized value to DB2, which halts the query. Perhaps you could rewrite the query to match the ASCII value of the characters instead of the characters themselves?

BML
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor