Subject Re: [ib-support] UPPER on calculated field with WIN1252/PXW_SWEDFIN
Author Ivan Prenosil
.....
> FULL_NAME COMPUTED BY (LTRIM(XNAME || ' ' || NAME)));
.....
> SELECT * FROM testtable_III
> WHERE UPPER(FULL_NAME) CONTAINING 'ER FRÅN';

1) CONTAINING is case insensitive operator, so you do not have to combine it with UPPER().

2) both CONTAINING and UPPER needs to know collation of their arguments to work
correctly with national characters.
By using LTRIM udf you lost that information for FULL_NAME column.
(and updating system table probably does not work as expectet)

Now you have several possibilities:

-Specify collation in WHERE clause
WHERE FULL_NAME COLLATE PXW_SWEDFIN CONTAINING 'ER FRÅN';

-Do not use LTRIM at all.
Either declare computed column
FULL_NAME COMPUTED BY (XNAME || ' ' || NAME));

or do not use computed field in where clause at all, e.g.
WHERE XNAME || ' ' || NAME CONATINING 'ER FRÅN';

-Rephrase your query, e.g.
WHERE XNAME CONATINING 'ER' AND XNAME CONTAINING 'FRÅN' OR ... ;


Ivan
http://www.volny.cz/iprenosil/interbase