dimension ctables(5,2) ctables(1,1)='sqlCompany' ctables(1,2)='pgCompany' ctables(2,1)='sqlvehiclebody' ctables(2,2)='pgVehiclebody' ctables(3,1)="sqlchartofaccounts" ctables(3,2)="pgchartofaccounts" ctables(4,1)="sqlchartofaccounttypes" ctables(4,2)="pgchartofaccounttypes" ctables(5,1)="sqlcountycodes" ctables(5,2)="pgcountycodes" SET STATUS BAR ON nInserts=0 FOR mycounter = 1 TO ALEN(ctables,1) fieldStr="" totalInserts=0 USE ctables(mycounter,1) alias sqlt IN 0 USE ctables(mycounter,2) IN 0 alias pgt SELECT sqlt * ?RECCOUNT() WAIT 'Working on '+ctables(mycounter,2) WINDOW nowait DELETE FROM pgt =TABLEUPDATE(.t.,.t.,'pgt') && zap the table in postgres SELECT sqlt SCAN SCATTER MEMVAR memo FOR i =1 TO FCOUNT() DO case case VARTYPE(EVALUATE(FIELD(i)))="L" fieldName='m.'+FIELD(i) IF EVALUATE(fieldname)=.f. &fieldname='0' ELSE &fieldname='1' ENDIF CASE VARTYPE(EVALUATE(FIELD(i)))="C" ftoPad='m.'+FIELD(i) &ftoPad=ALLTRIM(&ftoPad) ENDCASE NEXT m.updatedat=DATETIME() nInserts=nInserts+1 totalInserts=totalInserts+1 INSERT INTO pgt FROM memvar IF MOD(nInserts,100)=0 WAIT 'Have Inserted '+LTRIM(STR(totalInserts))+' into table '+ctables(mycounter,2) WINDOW nowait nInserts=0 res =TABLEUPDATE(.t.,.t.,'pgt') ENDIF SELECT sqlt ENDSCAN nInserts=0 SELECT pgt =TABLEUPDATE(.t.) CLOSE TABLES all NEXTEverything works fine except - All of the character fields (varchars in SQLServer and character varying in Postgres) end up padded with spaces to the maximum length of the fields. If a field has the value 'BOO' and it is put in a character varying field set to 10 then the data would actually transfer as 'BOO '. This won't work and I know that there must be some setting in the connection string that would keep this from happening but I can't find any documentation on it. Any help greatly appreciated!