0

I have a database named = many_cars with the table "cars" and im trying to copy all the cars with the color = silver and make = ford and ORDER BY LicenseNumber to my txt file called silver-ford.txt. What i have tried is to first

This should be done in bash and with SQLITE3

SELECT * FROM cars WHERE Color='Silver' AND Make='Ford'
ORDER BY LicenseNumber
INSERT INTO silver-fords.txt
ldz
  • 2,217
  • 16
  • 21
Peterssoen
  • 157
  • 3
  • 12

1 Answers1

1

Here is a very nice tutorial. CSV is the same as TXT - simply flat file, you can change extention after exprot, if you like.

Choose a mode, set header option and set destination. Than run your select

.headers on
.mode csv
.output data.csv
SELECT...
Alex
  • 731
  • 1
  • 6
  • 21