SQLite Forum

.selecttrace unknown and strange errors
Login
Your A1_100 trigger is weird.

Do you not simply mean:

```
CREATE TRIGGER IF NOT EXISTS A1_100 BEFORE UPDATE ON A1
WHEN NEW.A1_STATUS == 2 AND NEW.A1_REF IS NULL
BEGIN
    SELECT RAISE (ABORT, 'Error: someone goofed')
      WHEN (NOT (OLD.A1_STATUS IN (1, 8, 32, 64))) 
        OR (((OLD.A1_REF IS NOT NULL)) AND (NOT (OLD.A1_STATUS == 4)));
    SELECT RAISE (ABORT, 'Error you are not allowed to change the status')
      FROM C1 
     WHERE C1_INDEX == NEW.A1_INDEX;
END;
```

or are you deliberately recursively recursing the recursive trigger for some recursive reason that is not obviously recursing?