Mathias Spoerr <math...@spoerr.org> wrote: > I have problems with a specific query when using the "sqlite3_step" > function: > > SELECT DISTINCT interfaces_int_id,device_dev_id FROM devInterface > > INNER JOIN interfaces ON > devInterface.interfaces_int_id=interfaces.intf_id > > INNER JOIN nlink ON nlink.interfaces_intf_id=interfaces.intf_id > > INNER JOIN neighbor ON neighbor.neighbor_id=nlink.neighbor_neighbor_id
Why are you joining with all these tables, when the two fields you want to select both belong to devInterface? Why not simply SELECT DISTINCT interfaces_int_id,device_dev_id FROM devInterface; -- Igor Tandetnik _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users