Trigger: inserted value too large for column
648946Jul 8 2008 — edited Jul 8 2008Hello,
I have the "ORA-01401: inserted value too large for column" error during the insert in MyTable on the column "Description" (Varchar2 50).
The value is more than 50 char, about 230. I have developed this Trigger:
CREATE OR REPLACE TRIGGER "MyTrigger"
BEFORE INSERT ON "MyTable"
FOR EACH ROW
BEGIN
:new.Description := substr(:new.Description,1,50);
end;
It works but i have always the same error "ORA-01401: inserted value too large for column"
If modify the column lenght to 230 char, the trigger works fine and truncate the description to 50 char.
There is a way to do it without changing the length of the field ???
Is it possible to set the size of the :new.Description variable???
thanks