Date: prev next · Thread: first prev next last
2012 Archives by date, by thread · List index


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: users+help@global.libreoffice.org
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

Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.