@SCAN should work case insensitive independent of the collation but does not.
SQLBase Langugage Reference, Product Version 12:
repro: two columns, one with data type CHAR and one with NACHAR. No problems with CHAR.The @SCAN function can perform a case-insensitive match on columns of type CHAR, VARCHAR, NCHAR, NVARCHAR, LONG VARCHAR and LONG NVARCHAR.
set collation German_CS_AI;
create table ntest(text char(64),text_nchar nchar(64));
insert into ntest(text,text_nchar) values('abc','abc');
insert into ntest(text,text_nchar) values('ABC','ABC');
commit;
no problems with CHAR:
select @scan(text,'a') from ntest;
select @scan(text,'b') from ntest;
select @scan(text,'c') from ntest;
different bugs with NCHAR:
select @scan(text_nchar,'a') from ntest; -> gives 0/-1, should give 0/0
select @scan(text_nchar,'b') from ntest; -> gives 0/-1, should give 1/1
select @scan(text_nchar,'c') from ntest; -> gives 1/-1, should give 2/2
There are bugs with LONG VARCHAR too.
I entered a ticket for this.