sqlite3 is chopping/cutting/truncating my text columns

后端 未结 5 1391
太阳男子
太阳男子 2020-12-30 20:47

I have values being cut off and would like to display the full values.

Sqlite3 -column -header locations.dbs \"
select n.namelist, f.state, t.state
from name         


        
5条回答
  •  悲哀的现实
    2020-12-30 21:19

    I was indeed looking for solutions for the exact same issue and I found this workaround:

    sqliteresult=`sqlite3 -header -list $SQLITE_FILE "SELECT * ..." | tr "\\n" ";"`
    sqliteresult="${sqliteresult/;/;-----------------------------;}"
    sqliteresult="${sqliteresult//;/\n}"
    sqliteresult="${sqliteresult//|/\t|\t}"
    echo -e $sqliteresult
    

    Hoping it helps :)

    ~Stéphane

提交回复
热议问题