Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.


export query results to text file ?

Monique S
  • Monique S
    Monique S

    I'm using the browser to sort through my google chrome history, and all works great.  But, is it possible to export the query results to a text file?  The standard ">" or ".output" commands don't seem to work; I get a syntax error.

    Many thanks in advance,

  • Jan Zumwalt
    Jan Zumwalt

    The command line version of sqlite supports the "list" command. I use the PDO version and am looking into a simular cmd - it would be nice!

    sqlite -list -separator ', ' db.db 'select * from thetable'

  • ThetaWave

    I would like to do this also. I don't know anything about SQL Lite, but do know a bit about SQL. I came across your browser when looking for a way to read a SQL lite DB file. How can I export the results to a csv or any other format? I don't want to export the entire database, just a set of results.

    @jwzumwalt1, what do you mean by PDO version? Do I need to have some version of sql lite to run that command?

  • Jens Miltner
    Jens Miltner

    For more information on the SQLite commandline tool, look here.
    The SQLite commandline tool even has a "CSV" mode where query results are output in CSV format, so you can easily get your query results as CSV files by redirecting output to a file.
    On Mac OS X and Linux, the sqlite tool will come preinstalled (or is at least part of the standard sqlite installation), on Windows, you'll have to download & install yourself.