Eric DAVID wrote: > But this one gives correct results only with Spatialite GUI (Sqlite version > 3.7.3) or QGIS (Sqlite version 3.7.17) but wrong results with > System.Data.Sqlite (version 3.8.5). > > SELECT * FROM Pylones P > JOIN Lignes L ON L.lig_id = P.lig_id > JOIN idx_Pylones_pyl_geom I ON P.pyl_id = I.pkid > WHERE L.lig_id = 3;
This query works correctly under 3.8.5 with the following database: CREATE TABLE lignes(lig_id INTEGER PRIMARY KEY); CREATE TABLE pylones(pyl_id INTEGER PRIMARY KEY, lig_id); CREATE VIRTUAL TABLE idx_Pylones_pyl_geom USING rtree(pkid, xmin, xmax, ymin, ymax); INSERT INTO lignes VALUES(3); INSERT INTO pylones VALUES(1, 3); INSERT INTO pylones VALUES(2, 3); INSERT INTO idx_Pylones_pyl_geom VALUES(1, 0, 0, 0, 0); INSERT INTO idx_Pylones_pyl_geom VALUES(2, 0, 0, 0, 0); I guess your database might be different, but you haven't told us about it ... Regards, Clemens _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users