[SQL] Uppercase and Lowercase

2007-02-19 Thread Shavonne Marietta Wijesinghe
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_ind

Re: [SQL] Uppercase and Lowercase

2007-02-19 Thread Bart Degryse
Replace && by || >>> "Shavonne Marietta Wijesinghe" <[EMAIL PROTECTED]> 2007-02-19 16:22 >>> 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 co

Re: [SQL] Uppercase and Lowercase

2007-02-19 Thread Andrew Sullivan
On Mon, Feb 19, 2007 at 04:22:06PM +0100, Shavonne Marietta Wijesinghe wrote: > 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". Have a look at the initcap() function. A -- Andrew Sulliv

Re: [SQL] Uppercase and Lowercase

2007-02-19 Thread Shavonne Marietta Wijesinghe
day, February 19, 2007 4:25 PM Subject: Re: [SQL] Uppercase and Lowercase Replace && by || >>> "Shavonne Marietta Wijesinghe" <[EMAIL PROTECTED]> 2007-02-19 16:22 >>> Hello In my PostgreSQL database i have records inserted in Uppercase.

Re: [SQL] Uppercase and Lowercase

2007-02-19 Thread Bart Degryse
"VIA SENATO" in to "Via senato" but what i need is "Via Senato" Anyoneee?? Shavonne Wijesinghe - Original Message - From: Bart Degryse ( mailto:[EMAIL PROTECTED] ) To: pgsql-sql@postgresql.org Sent: Monday, February 19, 2007 4:25 PM S

Re: [SQL] Uppercase and Lowercase

2007-02-19 Thread Alvaro Herrera
Shavonne Marietta Wijesinghe wrote: > Hey thanks Bart. it worked ;) > > but sadly what it does is changes "VIA SENATO" in to "Via senato" but what i > need is "Via Senato" > > Anyoneee?? initcap() does what you want. -- Alvaro Herrerahttp://www.CommandPr

Re: [SQL] Uppercase and Lowercase

2007-02-19 Thread Bart Degryse
abase. From:[EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Bart Degryse Sent: Monday, February 19, 2007 9:49 AM To: pgsql-sql@postgresql.org Subject: Re: [SQL] Uppercase and Lowercase Of course it does. That's what you ask your query to do. You only used the wrong operator f