Re: Copy command and import - MS SQL Server to Postgres

From: "Goutam Paruchuri" <gparuchuri(at)oneil(dot)com>
To: "Robert Fitzpatrick" <robert(at)webtent(dot)com>, "Allen Landsidel" <alandsidel(at)gmail(dot)com>
Cc: <pgsql-general(at)postgresql(dot)org>
Subject: Re: Copy command and import - MS SQL Server to Postgres
Date: 2004-11-06 01:27:53
Message-ID: B2C547DF42419645804F05B54290755A0A22C4@DAYTONEX.oneilinc.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

I tried by taking the .000 still the same issue.

WITH NULL AS '' works fine.
WITH NULL AS NULL gives an error as well.

- Goutam


________________________________

From: Robert Fitzpatrick [mailto:robert(at)webtent(dot)com]
Sent: Fri 11/5/2004 5:33 PM
To: Allen Landsidel
Cc: Goutam Paruchuri; pgsql-general(at)postgresql(dot)org
Subject: Re: [GENERAL] Copy command and import - MS SQL Server to Postgres

On Fri, 2004-11-05 at 16:48, Allen Landsidel wrote:
> On Fri, 5 Nov 2004 16:31:21 -0500, Goutam Paruchuri
> <gparuchuri(at)oneil(dot)com> wrote:
> >
> > Iam trying to import data from ms-sql server to postgres. I export the data
> > which has datetime columns in sql server using BCP. I use the following to
> > import back into postgres.
> >
> > copy tablename from 'c:\\bcpdata\\mcfa\\tablename.txt' with delimiter as
> > '\t'
> >
> > I get the following error !!
> > invalid input syntax for type timestamp: ""
> >
> > My input file has the timestamp value like
> >
> > 2004-09-30 11:31:00.000
> >

What about the ".000" on the end? I am not able to enter that format in
a timestamp field in 7.4.5, it is invalid.

--
Robert

Confidentiality Notice
The information contained in this e-mail is confidential and intended for use only by the person(s) or organization listed in the address. If you have received this communication in error, please contact the sender at O'Neil & Associates, Inc., immediately. Any copying, dissemination, or distribution of this communication, other than by the intended recipient, is strictly prohibited.

Browse pgsql-general by date

  From Date Subject
Next Message Jerry LeVan 2004-11-06 02:33:23 Gborg down?
Previous Message Michael Fuhr 2004-11-05 23:44:44 Re: Retrieve ip client from postgres