On 5/29/2014 10:42 AM, David Bicking wrote:
How complicated is the join? Could you show a hypothetical SQL statement
you would have used had both tables been in the same database?

Not complicated:   Select b.id, b.name, b.otherfields from a inner join b on a.id = b.id where 
a.name<>b.name or a.otherfields<>b.otherfields;  -- where "otherfields" is 
about four fields of information.

Ah, I see. It's not very selective - it requires a full scan of both tables. What I had in mind was something like "run as much as you can against SQLite, figure out which (hopefully, few) rows you need to retrieve from SQL Server, then run a separate query there". But your statement doesn't lend itself to such a manual execution plan.

There exist an ODBC driver for SQLite: http://www.sqlite.org/cvstrac/wiki?p=SqliteOdbc (disclaimer: haven't used it myself). But you still need some SQL engine - such as MS Access - that can run queries against multiple ODBC sources. SQLite itself can't do that.
--
Igor Tandetnik

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

Reply via email to