echo .separator "," >grocery.sql

echo .output %filename% >>grocery.sql

echo select * from grocery; >>grocery.sql

echo .quit >>grocery.sql



sqlite3 grocery.db <grocery.sql

more %filename%



Michael D. Black

Senior Scientist

Advanced Analytics Directorate

Advanced GEOINT Solutions Operating Unit

Northrop Grumman Information Systems

________________________________
From: [email protected] [[email protected]] on 
behalf of Tim Leland [[email protected]]
Sent: Thursday, February 09, 2012 8:10 AM
To: 'General Discussion of SQLite Database'
Subject: EXT :[sqlite] .output Question

Im using sqlite3.exe to convert my database to .csv file. Here are the
commands Im passing to sqlite3.



.separator ","

.output text.csv

select * from grocery;

.quit



How can I get .output txt.csv to be %filename%.csv ????



thanks



Tim Leland

W. Lee Flowers & Co.

127 E. W Lee Flowers Rd.

Scranton, S.C. 29591

(843)389-2731



_______________________________________________
sqlite-users mailing list
[email protected]
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
_______________________________________________
sqlite-users mailing list
[email protected]
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to