Answer the question
In order to leave comments, you need to log in
FB2.5 Trigger - How to trim all strings in a column to 70 characters long?
Help writing a trigger. The table contains rows, one of the columns contains text from 1 to 81 characters. It is necessary that the field be cut off to 70 characters if this column has more than 70 characters. PLZ HELP
Answer the question
In order to leave comments, you need to log in
In the trigger BeforeInsert and BeforeUpdate write
more about SUBSTRING
http://firebirdsql.su/doku.php?id=substring&s[]=su...
beforeinsert and beforeupdate wrote
AS
begin
new.NAME = substring(new.NAME from 1 for 70);
end
ticks insert delete update did not touch
clicked lightning (compile), saved
but the number of characters does not change
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question