CREATE TABLE test( id INTEGER NOT NULL, ts_from TEXT NOT NULL DEFAULT CURRENT_TIMESTAMP, ts_eol TEXT DEFAULT NULL );
CREATE UNIQUE INDEX idx_test ON test(id, max(ts_from), ts_eol) WHERE ts_eol = NULL ; --Error: misuse of aggregate function max() Is this because max() is not deterministic, or because current_timestamp is not, or both? Ingo _______________________________________________ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users