I'm updating data in column [S.STATUS] and get an error:

SQL Error [335544565] [22018]: arithmetic exception, numeric overflow, or string truncation; Cannot transliterate character between character sets [SQLState:22018, ISC error code:335544565]'

I'm using DBeaver 6.0.2 and DB is Firebird 2.5.

Column Name, Data Type, Charset, Length 

I've tried to update multiple rows, single row, cast (S.STATUS as SMALINT) etc.

WHERE S.ID = 580864

Now [S.STATUS] = 9, I want to change it to [S.STATUS] = 3.


Probably the problem is that S.STATUS is primary key in other table [Table2]: 'Caused by: java.sql.SQLException: violation of PRIMARY or UNIQUE KEY constraint "Table" on table "Table2"; Problematic key value is ("ID" = 3) [SQLState:23000, ISC error code:335544665]

  • I think this reference material addresses your issue: firebirdfaq.org/faq79 – jimmy8ball Apr 11 at 14:42
  • The error itself indicates a problem with character sets of string values, and given the values in your code are all numerical, the problem is elsewhere, possibly caused by a historic problem with another column in your table and format versions applying a character set transliteration that is invalid because the data stored is not valid for the target character set. You will need to post a minimal reproducible example, or consider posting your question on the firebird-support mailing list as this will likely need troubleshooting, and stack overflow isn't really suitable for that. – Mark Rotteveel Apr 12 at 7:16

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.