I'm trying to attach one database to another so that data from it can be used in queries.

I'm using

ATTACH DATABASE '{full url}' AS {database_name};

No errors actually occur, but when I run

PRAGMA database_list

Only the main database shows.

  • And if you query the attached database? – HeikkiVesanto Oct 26 '18 at 10:28
  • @HeikkiVestano I get 'no such table' type errors. – user39790 Oct 26 '18 at 10:29
  • And you're using "database_name"."table_name" in the query? – HeikkiVesanto Oct 26 '18 at 10:41
  • @HeikkiVesanto Yes – user39790 Oct 26 '18 at 10:42
  • Does it work fine in the spatialite-gui? gaia-gis.it/fossil/spatialite_gui/index – HeikkiVesanto Oct 26 '18 at 10:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy