From: Gerald Gutierrez <gutz@kalador.com>
To: Maurizio Ortolan <crix98__@tin.it>
To: pgsql-sql@postgresql.org
Subject: RE: Error in the date field (with NULL value...).Thanks!
Date: Fri, 30 Mar 2001 13:36:38 -0800
Message-ID: <IIEOKIIOJMELMIFMMEBFCEHHCAAA.gutz@kalador.com> (raw)
In-Reply-To: <5.0.2.1.2.20010329064845.00a9e9b0@box.tin.it>
Perhaps you can run your file through a filter to replace '' to null.
Any of sed, perl, python and other scripting languages would do nicely.
e.g.
sed -e "s/''/null/g" < myfile > myfile2
-----Original Message-----
From: pgsql-sql-owner@postgresql.org
[mailto:pgsql-sql-owner@postgresql.org]On Behalf Of Maurizio Ortolan
Sent: Thursday, March 29, 2001 6:50 AM
To: pgsql-hackers@postgresql.org
Cc: pgsql-sql@postgresql.org; pgsql-general@postgresql.org;
crix98@hotmail.com
Subject: [SQL] Error in the date field (with NULL value...).Thanks!
...
My question:
How can I resolv my problem? I have a big data file to import where
in the 2nd date field there is '' instead of null ....
How can I "binds" PostgreSQL to consider '' as null ?
Many thanks for any suggestions!
CIAO!
MAURIZIO
*******************************************
** Happy surfing on THE NET !! **
** Ciao by **
** C R I X 98 **
*******************************************
AntiSpam: rimuovere il trattino basso
dall'indirizzo per scrivermi...
(delete the underscore from the e-mail address to reply)
---------------------------(end of broadcast)---------------------------
TIP 6: Have you searched our list archives?
http://www.postgresql.org/search.mpl
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-sql@postgresql.org
Cc: gutz@kalador.com, crix98__@tin.it
Subject: Re: Error in the date field (with NULL value...).Thanks!
In-Reply-To: <IIEOKIIOJMELMIFMMEBFCEHHCAAA.gutz@kalador.com>
References: <5.0.2.1.2.20010329064845.00a9e9b0@box.tin.it> <IIEOKIIOJMELMIFMMEBFCEHHCAAA.gutz@kalador.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox