sql trigger not working/ERROR ORA-00911

156 Views Asked by At

have problem with sql trigger:

CREATE TRIGGER trigger_zapujceni
AFTER INSERT
ON VYPUJCIT
FOR EACH ROW
BEGIN
UPDATE TITUL t
set t.POCET_AKTUALNE = t.POCET_AKTUALNE – 1
where t.ID_TITUL = :new.ID_TITUL;
END;

where line AFTER INSERT says ERROR: SQL Statement Ignored and line ON VYPUJCIT says: ORA-00911: Invalid character

does anyone knows and solution? Thanks a lot, I am not a sql master

1

There are 1 best solutions below

1
On

Your minus sign is some Unicode character but no "regular" minus sign.

db<>fiddle

Just replace the Unicode minus sign with a "regular" one and your trigger will be OK.