pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Shavonne Marietta Wijesinghe <shavonne.marietta@studioform.it>
To: pgsql-sql@postgresql.org
Subject: Uppercase and Lowercase
Date: Mon, 19 Feb 2007 16:22:06 +0100
Message-ID: <001001c75439$b7749b50$1102a8c0@dream> (raw)

Hello

In my PostgreSQL database i have records inserted in Uppercase. 
For example: VIA SENATO

What i want is to change them to "Via Senato". Ofcourse i'm looking for a automatico way. I wrote this code update registro1 set pa_indirizzo = upper(substr(pa_indirizzo, 1, 1)) && lower(substr(pa_indirizzo, 2, length(pa_indirizzo) - 1)) But it doesn't work.

When i run only update registro1 set pa_indirizzo = upper(substr(pa_indirizzo, 1, 1)) It gets me the first letter and when i run
update registro1 set pa_indirizzo = lower(substr(pa_indirizzo, 2, length(pa_indirizzo) - 1)) I get from the second letter to the last. But when i join them them don't work..
 

Anyone got any idea??

Thanks

Shavonne Wijesinghe

view thread (7+ messages)  latest in thread

Message-ID: <001001c75439$b7749b50$1102a8c0@dream>
Permalink:  ../001001c75439$b7749b50$1102a8c0@dream/
Also on:    postgresql.org/message-id/001001c75439$b7749b50$1102a8c0@dream

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: shavonne.marietta@studioform.it
  Subject: Re: Uppercase and Lowercase
  In-Reply-To: <001001c75439$b7749b50$1102a8c0@dream>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox