RE: Error in the date field (with NULL value...).Thanks!

From: "Gerald Gutierrez" <gutz(at)kalador(dot)com>
To: "Maurizio Ortolan" <crix98__(at)tin(dot)it>, <pgsql-sql(at)postgresql(dot)org>
Subject: RE: Error in the date field (with NULL value...).Thanks!
Date: 2001-03-30 21:36:38
Message-ID: IIEOKIIOJMELMIFMMEBFCEHHCAAA.gutz@kalador.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql


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(at)postgresql(dot)org
[mailto:pgsql-sql-owner(at)postgresql(dot)org]On Behalf Of Maurizio Ortolan
Sent: Thursday, March 29, 2001 6:50 AM
To: pgsql-hackers(at)postgresql(dot)org
Cc: pgsql-sql(at)postgresql(dot)org; pgsql-general(at)postgresql(dot)org;
crix98(at)hotmail(dot)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

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Najm Hashmi 2001-03-30 22:01:51 pg_dump error plus RelationBuildTriggers: 1 record(s) not found for rel links
Previous Message Tim Perdue 2001-03-30 19:32:53 Vacuum Error