Re: Moving data from SQL Server to Postgres via VFP ODBC Driver

From: Richard Broersma <richard(dot)broersma(at)gmail(dot)com>
To: Calvin <calvinsmith266(at)hotmail(dot)com>
Cc: pgsql-odbc(at)postgresql(dot)org
Subject: Re: Moving data from SQL Server to Postgres via VFP ODBC Driver
Date: 2010-08-09 17:59:30
Message-ID: AANLkTik8QBPwGOTbRpdXm+3+6O2wJ1LE5P3WnmPwcyyB@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-odbc

On Mon, Aug 9, 2010 at 10:13 AM, Calvin <calvinsmith266(at)hotmail(dot)com> wrote:
> I am attempting to move data from a SQL Server 2008 database to Postgres v8.4. I
> am using Visual Fox Pro as an intermediate step in this process. I open a
> connection to the SQL tables using the ODBC driver and at the same time open a
> connect to the PostGres table using PostgresSQL30. The reason I am doing it this
> way is I cannot seem to overcome issues concerning bit fields in SQL Server and
> Booleans in Postgres. Using VFP I can do a quick and dirty conversion. However,
> the problem is that when I look at the data in Postgres it converted
> successfully with the exception of varying character fields which have been
> padded to their maximum length. My insert statement is in the form :

It would seem that the string padding is taking place on the
SQL-Server side. Is there anyway to verify if it is treating the
varchar type as char in its odbc driver?

If you need to you can put the trimming operation in before insert
trigger functions on these columns. But I expect this solution is not
optimal.

--
Regards,
Richard Broersma Jr.

Visit the Los Angeles PostgreSQL Users Group (LAPUG)
http://pugs.postgresql.org/lapug

In response to

Responses

Browse pgsql-odbc by date

  From Date Subject
Next Message Richard Broersma 2010-08-09 18:50:59 Re: Moving data from SQL Server to Postgres via VFP ODBC Driver
Previous Message Calvin 2010-08-09 17:13:46 Moving data from SQL Server to Postgres via VFP ODBC Driver