Hi, create and fill the tables:
CREATE TABLE Games (ID INTEGER PRIMARY KEY, WhiteID INTEGER, BlackID INTEGER); CREATE VIRTUAL TABLE PlayersFTS USING FTS5 (LastName,FirstNames); INSERT INTO Games (WhiteID,BlackID) VALUES(1,2); INSERT INTO PlayersFTS (rowid,LastName,FirstNames) VALUES(1,'A','1'); INSERT INTO PlayersFTS (rowid,LastName,FirstNames) VALUES(2,'B','2'); The following SELECT statement fails with the error "unable to use function MATCH in the requested context": SELECT Games.* FROM Games,PlayersFTS WHERE ((PlayersFTS.rowid=Games.BlackID)OR(PlayersFTS.rowid=Games.WhiteID))AND(PlayersFTS MATCH 'LastName:A'); This SELECT statement works: SELECT Games.* FROM Games,PlayersFTS WHERE (PlayersFTS.rowid IN(Games.BlackID,Games.WhiteID))AND(PlayersFTS MATCH 'LastName:A'); Regards, Hartwig _______________________________________________ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users