Hi All,

Back in October I posted:

It seems that the csv output from SQLite has a major problem/error. Within CSV format, a quote should be returned as a double quote, within quotes. For example, if I have a field containing:

I said "Hi there"

then the CSV representation should be:

"I said ""Hi there"""

but sqlite seems to just return:

"I said "Hi there""

I've just tested the above in the new SQLite 3.3.9 and I get the correct:

sqlite> select 'I said "Hi there"';
"I said ""Hi there"""

and ran some other simple tests:

sqlite> select '"hi"';
"""hi"""

sqlite> select '"1,2","3",4';
"""1,2"",""3"",4"

sqlite> select 1,'"2"','"3,4"','"item 5''s 6"';
1,"""2""","""3,4""","""item 5's 6"""

sqlite> select 'line 1
   ...> line 2', 'line 2''s "second item"';
"line 1
line 2","line 2's ""second item"""

which all seem correct. Fantastic. Thanks Richard.

Now to go see if using .mode csv rather than .mode insert will make my program faster.

Thanks,
Tom


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

Reply via email to