Re: Modifying text data?

From: Darren Ferguson <darren(at)crystalballinc(dot)com>
To: Enrique Arizón Benito <e_arizon_benito(at)yahoo(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Modifying text data?
Date: 2002-03-13 14:40:13
Message-ID: Pine.LNX.4.10.10203130939070.28896-100000@thread.crystalballinc.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Check out UPPER() and LOWER() functions these will help you

i.e. upper(canada)
CANADA

i.e. lower(CAnada)
canada

i.e. initcap(canada)
Canada

HTH
Darren Ferguson

On 8 Mar 2002, [ISO-8859-1] Enrique Arizn Benito wrote:

> Hi,
> I'm trying to modify text fields in an "automatic" way so to be able
> for example, to change any 'Canada' substring occurrence with the
> UPPER CASE equivalent "CANADA", with the added option 'Canada'
> appearing anywhere inside the text field.
> While it is very easy to find matching registers by using regular
> expresions, (SELECT * from my_table where my_columm ~* 'canada'; in
> previous example) I find no way to change them afterwards, but
> manually updating each register.
>
> Thanks in advance for any suggestions!
>
> ---------------------------(end of broadcast)---------------------------
> TIP 6: Have you searched our list archives?
>
> http://archives.postgresql.org
>

In response to

Browse pgsql-general by date

  From Date Subject
Next Message PGMailList 2002-03-13 14:47:49 Re: Field Constraints
Previous Message Dan Langille 2002-03-13 14:15:58 Re: Field Constraints