Received: from web40020.mail.yahoo.com (web40020.mail.yahoo.com [66.218.78.60]) by postgresql.org (Postfix) with SMTP id A9B0A47596A for ; Wed, 10 Jul 2002 20:58:51 -0400 (EDT) Message-ID: <20020711005855.16548.qmail@web40020.mail.yahoo.com> Received: from [203.87.150.116] by web40020.mail.yahoo.com via HTTP; Wed, 10 Jul 2002 17:58:55 PDT Date: Wed, 10 Jul 2002 17:58:55 -0700 (PDT) From: Ludwig Lim Subject: Re: SqlServer to PostgreSql To: Luis Felipe Acevedo Fernandez Cc: pgsql-admin@postgresql.org In-Reply-To: <20020709191805531.AAA2276@mailserver.mvs.net.mx@there> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Archive-Number: 200207/171 X-Sequence-Number: 4857 --- Luis Felipe Acevedo Fernandez 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