Re: SqlServer to PostgreSql

From: Ludwig Lim <lud_nowhere_man(at)yahoo(dot)com>
To: Luis Felipe Acevedo Fernandez <luis(dot)felipe(at)unibase(dot)com(dot)mx>
Cc: pgsql-admin(at)postgresql(dot)org
Subject: Re: SqlServer to PostgreSql
Date: 2002-07-11 00:58:55
Message-ID: 20020711005855.16548.qmail@web40020.mail.yahoo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin


--- Luis Felipe Acevedo Fernandez
<luis(dot)felipe(at)unibase(dot)com(dot)mx> wrote:
> Hi!
> I triyed to migrate a database from SqlServer to
> PostgreSql, but I have a
> problem with char or varchar data types cos If I try
> to insert or select some
> information from a table the program retrieve blank
> spaces, my program was
> develop in PowerBuilder 7
>
> Example If there is a table with a column char(5)
> and I insert the word "Hi"
> with 2 character when the program try to retrieve
> the information
> it gets "Hi "
>

I also encountered the same problem in Oracle when
porting char(n) datatypes. Since char(n) datatypes
pads the string with spaces until it has n number of
characters. What you can do is you can use either
ltrim,rtrim in selecting the data from SQL Server, or
use the trim() function in the PowerBuilder before
inserting it to a postgres database.

ludwig

__________________________________________________
Do You Yahoo!?
Sign up for SBC Yahoo! Dial - First Month Free
http://sbc.yahoo.com

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message Bruce Momjian 2002-07-11 02:59:51 Re: postgres authentication
Previous Message David Stanaway 2002-07-10 23:39:48 Re: alter table modify column?