RE : COPY with null

From: "Luc ROLLAND" <luc(at)rolland-fr(dot)com>
To: <pgsql-novice(at)postgresql(dot)org>
Subject: RE : COPY with null
Date: 2003-11-10 12:24:32
Message-ID: 001301c3a785$99884740$0a00a8c0@LRP42530
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice


Hello,

You find here how to load data with postgreSQL 7.3.1a on Windows XP :

COPY APPELOFR
FROM 'C:/Temp/APPELOFR.txt'
WITH
DELIMITER AS '\t'
NULL AS 'NULL'
;

You must code your null data (numeric and/or character) as NULL in the text
files.

Luc ROLLAND

-----Message d'origine-----
De : pgsql-novice-owner(at)postgresql(dot)org
[mailto:pgsql-novice-owner(at)postgresql(dot)org] De la part de Karen Smallwood
Envoyé : mercredi 5 novembre 2003 21:27
À : pgsql-novice(at)postgresql(dot)org
Objet : [NOVICE] COPY with null

I have seen this question asked, but the answer doesn't seem to have worked
for the other person or myself. I have several files I need to copy into
postgres and if I try
COPY compmstr from '/user/local/testfile' using delimiters '\t' with null as
'' (or '\N' or '\t\t' or anything else);
I get ERROR: copy: line 1, Bad numeric input format '' (or whatever I
used). I am using files that can have numeric nulls and/or character nulls

Anyone figure this one out? I'm on 7.3.2

Karen Smallwood
Programmer/Analyst
Mighty Distributing System of America, Inc.
650 Engineering Drive
Norcross, Georgia 30092
(770) 448-3900
(770) 446-8627 fax

---------------------------(end of broadcast)---------------------------
TIP 7: don't forget to increase your free space map settings

Browse pgsql-novice by date

  From Date Subject
Next Message Volker Krey 2003-11-10 13:06:22 UPDATE with help of RULES
Previous Message Luca Ferrari 2003-11-10 08:20:35 postgresSQL & perl