On 11/26/2014 8:58 PM, Sam Carleton wrote:
The question is how to make the trigger work for both cases.
Experimentally, when EventNodeId is omitted from INSERT statement,
new.EventNodeId == -1 in the trigger. So I think something like this
should work:
INSERT INTO EventNode ( EventNodeId, ...)
VALUES( (case when new.EventNodeId < 0 then null else new.EventNodeId
end), ...);
--
Igor Tandetnik
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users