SQLite Forum

How to write this trigger?
Login
I want to replace CF/LF with LF in notes field.

I created two triggers (one `before insert` and one `before update`) like so:

```
CREATE TRIGGER tgr before insert on t
begin
  select new.notes = replace(new.notes,char(13)||char(10),char(10));
end;
```

but they don't seem to work.

So, how do I do this?

---

BTW, is it possible to have the same trigger (like example above) assigned to both `INSERT` and `UPDATE` so as to not to have to write the same trigger twice?