From: | Calvin <calvinsmith266(at)hotmail(dot)com> |
---|---|
To: | pgsql-odbc(at)postgresql(dot)org |
Subject: | Moving data from SQL Server to Postgres via VFP ODBC Driver |
Date: | 2010-08-09 17:13:46 |
Message-ID: | loom.20100809T190420-758@post.gmane.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-odbc |
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 :
Insert into PostgresTableName Values(m.field1, trim(m.field2....)
The m. systax is because I am using memory variables in VFP. The data contained
in the m.fields has all be trimmed if it is character type.
Is there any way to keep varying character fields from being padded out to their
maximum length.
Thanks!
From | Date | Subject | |
---|---|---|---|
Next Message | Richard Broersma | 2010-08-09 17:59:30 | Re: Moving data from SQL Server to Postgres via VFP ODBC Driver |
Previous Message | noreply | 2010-08-05 21:39:14 | [ psqlodbc-Bugs-1010864 ] CODBCFieldInfo field type (m_nSQLType) is incorrect |