Re: [GENERAL] COPY error with null date

2014-03-24 Thread Alban Hertroys
On 24 Mar 2014, at 5:32, Rajeev rastogi rajeev.rast...@huawei.com wrote: On 21st March 2014, Ashmita Jain Wrote: It is taking date as an empty string. Try defining the empty field as ā€˜\Nā€™ in your source file. ā€˜\Nā€™ in copy source file always results into an empty string (unless

Re: [GENERAL] COPY error with null date

2014-03-23 Thread Rajeev rastogi
On 21st March 2014, Ashmita Jain Wrote: It is taking date as an empty string. Try defining the empty field as '\N' in your source file. '\N' in copy source file always results into an empty string (unless something written in new line), which is correct only. So COPY from such source file will

[GENERAL] COPY error with null date

2014-03-21 Thread Ashmita Jain
It is taking date as an empty string. Try defining the empty field as '\N' in your source file. ::DISCLAIMER:: The contents of this e-mail and any

Re: [GENERAL] COPY error with null date

2008-12-07 Thread Bill Todd
Joshua D. Drake wrote: On Fri, 2008-12-05 at 12:00 -0700, Bill Todd wrote: Joshua D. Drake wrote: On Thu, 2008-12-04 at 19:35 -0700, Bill Todd wrote: null as IS NULL results in the following error. ERROR: syntax error at or near is LINE 5: null as is null

Re: [GENERAL] COPY error with null date

2008-12-07 Thread Tom Lane
Bill Todd [EMAIL PROTECTED] writes: I am beginning to suspect this is impossible. That's correct: see the COPY reference page. A quoted value is never considered to match the NULL string. regards, tom lane -- Sent via pgsql-general mailing list

[GENERAL] COPY error with null date

2008-12-04 Thread Bill Todd
Using 8.3.3 I am trying to import a CSV file using the following copy command. copy billing.contact from 'c:/export/contact.csv' with delimiter as ',' null as '' csv quote as ''; The following record record causes an error because the third field, , is a null date and causes the error

Re: [GENERAL] COPY error with null date

2008-12-04 Thread Joshua D. Drake
On Thu, 2008-12-04 at 19:35 -0700, Bill Todd wrote: Using 8.3.3 I am trying to import a CSV file using the following copy command. copy billing.contact from 'c:/export/contact.csv' with delimiter as ',' null as '' csv quote as ''; The following record record causes an error because the