SQLite Forum

SQLite3 command using select to CSV or terminal does not return all rows
Login

SQLite3 command using select to CSV or terminal does not return all rows

(1) By Owen (OwenMc) on 2021-04-05 18:01:53 [source]

Command in linux terminal is:
sqlite3 -header -csv /home/user/.dbeaver4/.metadata/sample-database-sqlite-1/Chinook.db "select * from VF2;" > "/mnt/Shared/Vodafone speed/VF for TX.csv"

Same command to terminal returns same result - not all rows.

Linux distro is:
Linux kali 5.9.0-kali5-amd64 #1 SMP Debian 5.9.15-1kali1 (2020-12-18) x86_64 GNU/Linux

Symptom is the resulting CSV does not contain all rows that are in the table VF2.

Other tables in the same DB do return all rows.

If the CSV export is done using DBMS DBeaver export, all rows are returned.

If the CSV export is done using DBBrowser for SQLite, all rows are returned.

Any help would be appreciated.
Regards,
Owen.

(2) By Keith Medcalf (kmedcalf) on 2021-04-05 18:22:38 in reply to 1 [link] [source]

I get the response that the database file and directories do not exist when executing that command.

(3) By Owen (OwenMc) on 2021-04-06 08:44:09 in reply to 2 [link] [source]

Thanks for your reply Keith! My apologies I could have clarified that I created the table VF2 in the sample DB.

However, I have found what I was doing wrong - I was not commiting the transactions and the DBeaver GUI showed all transactions while SQLite3 did not - until the commit.

Sorry for wasting your time, I've not used SQLite before only MS SQL Server.

Regards,

Owen.