Re: help needed triming varchar2 columns

From: Albert Hetzel <alhetzel_at_ix.netcom.com>
Date: 1996/07/21
Message-ID: <4sto7c$17u_at_dfw-ixnews6.ix.netcom.com>#1/1


dblocher_at_prolog.net (David Blocher) wrote:

>We are running Oracle 7.0.12 and we expported our database to reorganize the
>extents. While doing so we changed the char columns to varchar2. The problem
>is that when we imported the data all of our varchar2 coulums were padded with
>trailing blanks. Is there an option with an import utility so the columns
>will not be padded. Or does the export utility have some way to remove
>trailing blanks on varchar2. I find it odd that switched to varchar2 to get
>variable lengths, but the import utility made every column max length. Any
>help would be greatly appreciated.
>David Blocher
>dblocher_at_prolog.net

Try the RTRIM() function. Depending on your database, the format should look something like this:

UPDATE table_to_update
SET column_to_update = RTRIM(column_to_update,' ');

This should have the desired effect.

Al Hetzel Received on Sun Jul 21 1996 - 00:00:00 CEST

Original text of this message