Answer the question
In order to leave comments, you need to log in
How can I easily and conveniently insert a data table into a SQLite3 database?
For example, there is such a table with data on the site:
mfd.ru/centrobank/correspondentaccountbalances/
I need to insert this table into the SQLite3 database.
How can this be conveniently done?
It is assumed in advance that I have already created a database and an empty table (without empty lines).
Used by Linux.
I use DB Browser (but I can use anything).
Answer the question
In order to leave comments, you need to log in
1) If you are a little lazy, then write an import script, in any language you know
2) If you are averagely lazy, then use Ctrl + C / Ctrl + V in a text editor (for example, in Kate), and then replace with regular expressions, so that the output is INSERT instructions true-la-la
3) If you are very lazy
- Ctrl + C / Ctrl + V in LibreOffice Calc
- Save to CSV
- Then import from CSV via SQL Studio (here there is a description with pictures )
4) If you are very lazy, hire a freelancer to write a script for you for $5
A slightly more detailed description of the 3rd option proposed by Vitaliy Orlov:
A solution based on this instruction sqlitetutorial.net/sqlite-import-csv/ .
Step by step:
1) Copy data to clipboard and paste into Libre Calc (Ctrl+C; Ctrl+V).
2) Save the resulting table to a .CSV file (File -> Save As... -> Text CSV [.csv])
3) Import the resulting .CSV file via DB Browser or SQLiteStudio into the already created SQLite database table (File -> Import -> Tables from CSV file...).
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question