Обсуждение: Converting file -Invalid data format on input DATE

Поиск
Список
Период
Сортировка

Converting file -Invalid data format on input DATE

От
Fred Wohlfert
Дата:
I am converting data from  dBaseIII format trying to load into Postgresql.

I am having a problem with DATE field, the file I am working with does
not have any data for
this field on some records.  I have been fixing other problems with sed,
however I am stumped with this.

Will Postgresql take a null as input for a DATE field?

Does anyone know how to specify the null character in SED?

Thanks in advance.

Re: Converting file -Invalid data format on input DATE

От
Bruno Wolff III
Дата:
On Tue, Nov 23, 2004 at 16:36:07 -0500,
  Fred Wohlfert <fredwohlfert@ehbmail.com> wrote:
> I am converting data from  dBaseIII format trying to load into Postgresql.
>
> I am having a problem with DATE field, the file I am working with does
> not have any data for
> this field on some records.  I have been fixing other problems with sed,
> however I am stumped with this.
>
> Will Postgresql take a null as input for a DATE field?

If you mean an empty string, no that isn't a valid date. You can store
SQL NULLs in a date column as long as you don't have any constraints that
would prohibit them.