Hi,

I’ve just come across an oddity using FTS5. I have an FTS table that may get joined multiple times in a query so each time I give it an alias. The problem is that the match operator generates a “no such column” error when I use the table alias.

e.g.

SELECT DISTINCT n.uid FROM nodes n
JOIN nodefts n_fts ON n.uid = n_fts.uid
WHERE n_fts MATCH “A*”

gives “SQLError: no such column: n_fts”

Giving the actual table name works but can’t be done with multiple joins:

SELECT DISTINCT n.uid FROM nodes n
JOIN nodefts n_fts ON n.uid = n_fts.uid
WHERE nodefts MATCH “A*”

Giving the table name as a column name works but seems inconsistent in syntax:

SELECT DISTINCT n.uid FROM nodes n
JOIN nodefts n_fts ON n.uid = n_fts.uid
WHERE n_fts.nodefts MATCH “A*”

Have I misinterpreted the syntax or is the last form what is intended?

Cheers,

Alexei
_______________________________________________
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to