Skip to content

is it possible to connect to 2 SQLite file db and do a join with them #143

Closed Answered by mithrandyr
Tonic8 asked this question in Q&A
Discussion options

You must be logged in to vote

@Tonic8
You can use the ATTACH and DETACH commands. however, make sure you pass in the full path to the file. you can use PRAGMA database_list to see all the databases attached.

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

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by Tonic8
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants