Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TugboatEng 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
Joined
Dec 19, 2002
Messages
1
Location
GB
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.
 
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

Back
Top