Re: Unable to use COPY..FROM with NULL numeric fields

From: eric soroos <eric-psql(at)soroos(dot)net>
To: pgsql-novice(at)postgresql(dot)org
Subject: Re: Unable to use COPY..FROM with NULL numeric fields
Date: 2002-10-30 01:02:28
Message-ID: 80119228.1176211548@[4.42.179.151]
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

On Tue, 29 Oct 2002 16:34:55 -0800 in message <E936C9C6709EF340B2B00D779FD59CF703BE2D2D(at)nowexchange(dot)HANKEYINVESTMENTS(dot)COM>, "Nikh Nath" <nnath(at)westlakefinancial(dot)com> wrote:
> Hi,
>
> I am trying to use the following command to import a file into pgsql.
>
> COPY acct FROM '/home/megasys/acct.dmp.new' USING DELIMITERS
> '\t' WITH NULL AS '\N';
>
> I keep getting this error.
>
> ERROR: copy: line 1, Bad numeric input format '\N'
>

Try:

COPY acct FROM '/home/megasys/acct.dmp.new' USING DELIMITERS '\t' WITH NULL AS '\\N';

eric

In response to

Browse pgsql-novice by date

  From Date Subject
Next Message Nikh Nath 2002-10-30 01:39:00 Re: Unable to use COPY..FROM with NULL numeric fields
Previous Message Nikh Nath 2002-10-30 00:34:55 Unable to use COPY..FROM with NULL numeric fields