On Fri, 21 Dec 2012, Jay Lozier wrote:
In a csv file the field delimiter is usually a comma and to denote what is
a string that may contain a comma quotation marks are used. If the cell in
the original format was empty or NULL in a database nothing is exported.
For example the export from a database might look like this:
1,"text string, test",,,"the last two were NULLs in the database",34
2."another string",3,3,,57
Jay,
I know this and that's why I don't understand why postgres balks at
inserting the rows with NULL values in text columns.
For the exported value to an empty string ("") the original value must be an
empty string "" not an empty cell. When importing into a database is it often
better to have the equivalent to a NULL value because the each column in the
database will have an assigned data type and the empty string will cause an
import error if there is data type mismatch. The empty string will cause
problems with numeric data.
That's what I'm doing: replacing empty cells with NA strings. I aborted
the first attempt yesterday afternoon because it was late and the size of
the data file (~20 Mb) was taking too long to complete. I'll do this today.
Thanks,
Rich
--
For unsubscribe instructions e-mail to: [email protected]
Problems? http://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/
Posting guidelines + more: http://wiki.documentfoundation.org/Netiquette
List archive: http://listarchives.libreoffice.org/global/users/
All messages sent to this list will be publicly archived and cannot be deleted