I need to get data from a PostgreSQL table into an SQLite table. I am exporting the data from PostgreSQL into a CSV file, and then trying to import it into SQLite from a command-line prompt. First I tried this:
c:> /sqlite3/sqlite3 sample.trd ".import source_file.csv trend_data"
For every line in the file, I got an error message saying SQLite expected three values and there was only one. Not really surprising because I never told SQLite that the file was a CSV file. So then I tried this:
c:> /sqlite3/sqlite3 sample.trd ".mode csv .import source_file.csv trend_data"
I got no errors, but I also got no data.
Thank you.