T&B wrote:
I think I've discovered yet another bug in the CSV output using the
sqlite3 command line tool.
Here's a sample of the new bug:
.mode csv
select 'a=1,234', 'b=5';
gives:
a=1,234,b=5
but should give:
"a=1,234",b=5
Since no replies, I'll assume this is a bug. I've reported it as:
http://www.sqlite.org/cvstrac/tktview?tn=2850
CSV seems to have quite a history of bugs in SQLite :-/
Tom,
Yes, this is a bug.
The fix is quite simple if you are building your own sqlite library. In
the file shell.c or the amalgamation sqlite3.c there is a function
output_csv(). You need to change the line that says:
if( needCsvQuote[((unsigned char*)z)[i]] ){
to:
if( needCsvQuote[((unsigned char*)z)[i]] || z[i]==p->separator ){
This will cause sqlite to quote text that contains the separator
character, which defaults to a comma.
HTH
Dennis Cote
-----------------------------------------------------------------------------
To unsubscribe, send email to [EMAIL PROTECTED]
-----------------------------------------------------------------------------