Subject | Re: [ib-support] UPPER on calculated field with WIN1252/PXW_SWEDFIN |
---|---|
Author | Ivan Prenosil |
Post date | 2002-06-24T14:25:04Z |
.....
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
> FULL_NAME COMPUTED BY (LTRIM(XNAME || ' ' || NAME)));.....
> SELECT * FROM testtable_III1) CONTAINING is case insensitive operator, so you do not have to combine it with UPPER().
> WHERE UPPER(FULL_NAME) CONTAINING 'ER FRÅN';
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