Re: Importing from Access 2000?

From: Bjørn T Johansen <btj(at)havleik(dot)no>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: Importing from Access 2000?
Date: 2003-04-29 13:31:20
Message-ID: 1051623080.23872.1.camel@laptop.havleik.no
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Well, they are timestamps but they are just using the time part without
the date part in the old access db.
So I am not sure which type it should be the postgresql db, so any
suggestions are appreciated...

BTJ

On Tue, 2003-04-29 at 15:25, Richard Huxton wrote:
> 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
--
-----------------------------------------------------------------------------------------------
Bjørn T Johansen (BSc,MNIF)
Executive Manager
btj(at)havleik(dot)no Havleik Consulting
Phone : +47 67 54 15 17 Conradisvei 4
Fax : +47 67 54 13 91 N-1338 Sandvika
Cellular : +47 926 93 298 http://www.havleik.no
-----------------------------------------------------------------------------------------------
"The stickers on the side of the box said "Supported Platforms: Windows
98, Windows NT 4.0,
Windows 2000 or better", so clearly Linux was a supported platform."
-----------------------------------------------------------------------------------------------

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Jose Manuel Sanchez 2003-04-29 13:44:16 create gist index
Previous Message Richard Huxton 2003-04-29 13:25:34 Re: Importing from Access 2000?