google-code-export / sqlite-manager

Automatically exported from code.google.com/p/sqlite-manager
1 stars 0 forks source link

Append newline to the last record when saving as CSV #858

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
From the Execute SQL tab:

Run a select * from query that results in the last column being null.
Choose: Actions | Save as Result(CSV) to File

Expected behavior:
The file should be immediately importable to the same table (assuming unique 
and other constraints not violated) and the last field should be imported as 
null.

Observed behavior:
The last "row" in the output file is not EOL terminated.
If the select results in a single row, the subsequent import fails with an 
error about the number of source columns not matching the destination.
If the select results in multiple rows the import will succeed but the last 
(unterminated) row will have an empty string in the last column.

Example table:
CREATE TABLE "example2" ("id" INTEGER NOT NULL , "sometext" TEXT, "someint" 
INTEGER)

Example import data:
(attached)

Original issue reported on code.google.com by Max.Slim...@gmail.com on 25 Sep 2014 at 9:12

Attachments: