CSV files & empty strings

From: Nate Randall <nate1604(at)gmail(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: CSV files & empty strings
Date: 2009-10-20 04:55:45
Message-ID: a4c6b1fe0910192155r1a2a4fa8w4e179c360073e2be@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

I am new to Postgre, having formerly used Filemaker Pro. I need to import
CSV files into Postgre which contain some empty string "" values in several
date-type fields. I am able to import the CSV files into Postgre with the
COPY FROM command if the datefields are converted to text fields in
Postgre. However, I need some method of "converting" the empty string ""
values into NULL values after import, so that I can change the date fields
back to date-type. Any suggestions on how this could be accomplished?

Thanks,

-Nate

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Viktor Rosenfeld 2009-10-20 06:02:06 Re: 10/13 SFPUG meeting, "The Mighty GUCS," video now available
Previous Message David Fetter 2009-10-20 04:38:26 Re: Free Tool to design Postgres Databases