Hi,

I have a database where some values contain carriage returns. I am using the 
command line to execute sqlite commands, eg:

sqlite3 Disney.db "SELECT * FROM Characters"

When I get the result of a SELECT statement, the output has columns separated 
by pipe characters and rows by new lines. So, if a value contains a return, it 
prematurely starts a new line, and messes up my output result.

What's the best approach to deal with this?

I guess I could use the command:

.mode csv

to change the output to csv (which wraps newlines in values within quotes). But it 
doesn't hold from one sqlite3 command to the next. And I can't see how to do this in a 
single command line, and there'd be too much overhead to write the ".mode" and 
SELECT commands to a temporary file to then invoke through a sqlite3 command.

I hope I'm missing something simple. Can anyone help, please?

Thanks,
Tom


-----------------------------------------------------------------------------
To unsubscribe, send email to [EMAIL PROTECTED]
-----------------------------------------------------------------------------

Reply via email to