Re: Stripping empty space from all fields in a table?

From: "Shoaib Mir" <shoaibmir(at)gmail(dot)com>
To: "J B" <jbwellsiv(at)gmail(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Stripping empty space from all fields in a table?
Date: 2006-10-27 19:46:11
Message-ID: bf54be870610271246x446f34fy78a0783a43cdfd0d@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

You can use something like

select ltrim(string, ' ');

and

select rtrim(string, ' ');

Thanks,
--------
Shoaib Mir
EnterpriseDB (www.enterprisedb.com)

On 10/28/06, J B <jbwellsiv(at)gmail(dot)com> wrote:
>
> Guys,
>
> I have a table that has various fields that have whitespace in the values.
> I'd like to roll through and strip the left and right whitespace out of all
> fields that contain strings.
>
> Is there any easy way to do this?
>
> Thanks!
>
> JB
>

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Steve Atkins 2006-10-27 19:47:29 Re: Stripping empty space from all fields in a table?
Previous Message Russ Brown 2006-10-27 19:42:06 Re: Simple OUTER JOIN doubt