People who understand SQL can employ the sqlite3 command-line shell (or various third-party SQLite access programs) to analyze large datasets. Raw data can be imported from CSV files, then that data can be sliced and diced to generate a myriad of summary reports.
Click the File menu near the top right corner of the SQLite Database Browser window that opens and select Open Database. Browse to the location of the SQLite file you wish to read and click the file. Click the "Open" button. The SQLite file contents will display.
Start the sqlite3 program by typing "sqlite3" at the command prompt, optionally followed by the name the file that holds the SQLite database (or ZIP archive). If the named file does not exist, a new database file with the given name will be created automatically.
From a sqlite prompt:
sqlite> .read db.sql
Or:
cat db.sql | sqlite3 database.db
Also, your SQL is invalid - you need ;
on the end of your statements:
create table server(name varchar(50),ipaddress varchar(15),id init);
create table client(name varchar(50),ipaddress varchar(15),id init);
Use sqlite3 database.sqlite3 < db.sql
. You'll need to make sure that your files contain valid SQL for SQLite.
Alternatively, you can do this from a Windows commandline prompt/batch file:
sqlite3.exe DB.db ".read db.sql"
Where DB.db is the database file, and db.sql is the SQL file to run/import.
You can also do:
sqlite3 database.db -init dump.sql
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With