is it possible to connect to 2 SQLite file db and do a join with them #143
-
i have a scenario where i have 2 SQLite db coming from diffrent source but would like to do a join between the data of the 2 DB following this thread there is a command to attahc 2 db on the same connection ` .databases select i'm thinking to bulk copy to a temp SQLIte db the 2 db file, but if the file start to be huge, it will add more time to the scripts. :) |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
@Tonic8 Open-SQLiteConnection #open an in memory database
Invoke-SqlUpdate "ATTACH 'c:\fullpathtofile\somefile.db' AS db1"
Invoke-SqlQuery "PRAGMA database_list" #list out the databases on the current connnection |
Beta Was this translation helpful? Give feedback.
@Tonic8
You can use the
ATTACH
andDETACH
commands. however, make sure you pass in the full path to the file. you can usePRAGMA database_list
to see all the databases attached.