Subject Re: UNICODE_FSS in select statement - ERROR
Author Sasa Mihajlovic
Hi Helen,

--- In firebird-support@yahoogroups.com, Helen Borrie <helebor@...> wrote:
>
> At 08:30 PM 12/03/2009, you wrote:
>
> >It is not non-unicode caracters it is characters from win1251 set (latin)
>
> win1251 is not unicode, and a "collation" called UNICODE_FSS is not a valid collation for the win1251 character set.

I know that, I just want to describe which letters are used for data in columns, because yahoo groups doesn't show them correctly.

>
> You will need to create a new (temporary) column and use it to convert your data, viz.
>
> alter table yourtable
> add tempunicode varchar(50) character set UNICODE_FSS
>
> Commit that; then do
>
> update yourtable
> set tempunicode = cast (ExistingColumn as varchar(50) character set UNICODE_FSS)
>
> Commit that; then check that the new column has the data correctly.
>
> Then drop the ExistingColumn; then do
>
> alter table yourtable
> add ExistingColumn varchar(50) character set UNICODE_FSS
>
> Commit that; then do
>
> update yourtable
> set ExistingColumn = tempunicode
>
> Check the data; then finally, drop the tempunicode column.
>

This works fine, I was created a TempColumn and do all of these items from yours list but same error has ocured. When I update save all Name column data to TempColumn and call
SELECT TemColumn FROM Articles WHERE TempColumn LIKE '%NA%'
Firebird raise error:
Arithmetic overflow or division by zero has occurred.
arithmetic exception, numeric overflow, or string truncation.
Cannot transliterate character between character sets.
the Name and TempColumn are both UNICODE_FSS.
If I execute this select statement with option FetchOnDemand when ibexpret return first 15 records and then fetch one by one this error will raise when TempColumn contain some of latin character.