Tuple IN with one constant VARCHAR value can cause exception
Details
| Detail name | Value |
|---|---|
| Changelog Number | 9971 |
| Type | Bug |
| Status | Resolved |
| Affected Versions | Exasol 6.1.0, Exasol 6.2.0, Exasol 7.0.0 |
| Fix Versions | Exasol 7.0.0, Exasol 6.1.9, Exasol 6.2.7 |
| Resolution Date | 2020-04-22 |
Description
If you use a tuple IN with String values this will cause an exception if:
- the IN list contains exactly one tuple
- and that tuple contains a constant (VAR)CHAR value
- and this value does not contain UTF8 characters
- and the table column filtered against does contain UTF8 data
Example:
create table u(a varchar(200), b varchar(200));
insert into u values (('a', 'ä'), ('b','b'));
select * from u where (a,b) in (VALUES ('b','b'));
--> data exception - Wrong character, argument should be ascii-character
Workaround
Split the tuple IN into two filters.
Example:
select * from u where a='b' and b='b'