Re: Importing from Access 2000?

From: Richard Huxton <dev(at)archonet(dot)com>
To: "Bjorn T Johansen" <btj(at)havleik(dot)no>, pgsql-general(at)postgresql(dot)org
Subject: Re: Importing from Access 2000?
Date: 2003-04-29 13:25:34
Message-ID: 200304291425.34901.dev@archonet.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Tuesday 29 Apr 2003 12:42 pm, Bjorn T Johansen wrote:
> I am trying to convert an Access database to PostgreSQL and the import
> works until it comes to timestamps, then I get error msg like these:
>
> ERROR: Bad timestamp external representation '0000-00-00 01:00:00'
[snip more errors]
> ERROR: Bad timestamp external representation '0000-00-00 19:00:00'
>
> Does anyone have any suggestion on how to overcome this problem?
> (BTW, I am using PostgreSQL 7.3.2 and ODBC)

These don't appear to be valid timestamps, hence the problem. At a guess,
they're not actually being used to store timestamps. AFAICT your options are:

1. Fix the data so that they are valid timestamps.
2. Use some other format more suited for your data (interval?)
3. Store your timestamp values in text in PGSQL (no, I don't like this
either).

Options 1 or 2 are the way to go, but it's difficult to say more without
knowing what the data is supposed to mean. There is no year-zero, month-zero,
day-zero so they can't be timestamps. Let us know what they mean and someone
on the list will be able to suggest a suitable type, I'm sure.

HTH

--
Richard Huxton

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Bjørn T Johansen 2003-04-29 13:31:20 Re: Importing from Access 2000?
Previous Message Andrew Sullivan 2003-04-29 12:19:14 Re: Slow Queries with OR's?