Received: from localhost (maia-1.hub.org [200.46.204.191]) by postgresql.org (Postfix) with ESMTP id 39DBB9FB29D for ; Mon, 19 Feb 2007 11:39:53 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.191]) (amavisd-new, port 10024) with ESMTP id 51974-08 for ; Mon, 19 Feb 2007 11:39:43 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey-1.7.4 Received: from smtpout18.attiva.biz (smtpout18.attiva.biz [85.37.16.20]) by postgresql.org (Postfix) with ESMTP id 053869FB86F for ; Mon, 19 Feb 2007 11:39:42 -0400 (AST) Received: from FBCMFE02B15.fbc.local ([192.168.30.161]) by smtpout18.attiva.biz with Microsoft SMTPSVC(6.0.3790.1830); Mon, 19 Feb 2007 16:39:40 +0100 Received: from dream ([88.34.161.130]) by FBCMFE02B15.fbc.local with Microsoft SMTPSVC(6.0.3790.1830); Mon, 19 Feb 2007 16:39:32 +0100 Message-ID: <002701c7543c$2a888730$1102a8c0@dream> Reply-To: "Shavonne Marietta Wijesinghe" From: "Shavonne Marietta Wijesinghe" To: "Bart Degryse" , References: <001001c75439$b7749b50$1102a8c0@dream> <45D9CF8C.A3DD.0030.0@indicator.be> Subject: Re: Uppercase and Lowercase Date: Mon, 19 Feb 2007 16:39:38 +0100 Organization: Studio FORM MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_0024_01C75444.8BC52190" X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2900.3028 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3028 X-OriginalArrivalTime: 19 Feb 2007 15:39:33.0025 (UTC) FILETIME=[26DEB910:01C7543C] X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.096 tagged_above=0 required=5 tests=AWL, BAYES_50, HTML_MESSAGE X-Spam-Level: X-Archive-Number: 200702/196 X-Sequence-Number: 27530 This is a multi-part message in MIME format. ------=_NextPart_000_0024_01C75444.8BC52190 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Hey thanks Bart. it worked ;)=20 but sadly what it does is changes "VIA SENATO" in to "Via senato" but = what i need is "Via Senato" Anyoneeeeeee?? Shavonne Wijesinghe ----- Original Message -----=20 From: Bart Degryse=20 To: pgsql-sql@postgresql.org=20 Sent: Monday, February 19, 2007 4:25 PM Subject: Re: [SQL] Uppercase and Lowercase Replace && by || >>> "Shavonne Marietta Wijesinghe" = 2007-02-19 16:22 >>> Hello In my PostgreSQL database i have records inserted in Uppercase.=20 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 =3D 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 =3D = upper(substr(pa_indirizzo, 1, 1)) It gets me the first letter and when i = run update registro1 set pa_indirizzo =3D 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 ------=_NextPart_000_0024_01C75444.8BC52190 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable
Hey thanks Bart. it worked ;)
 
but sadly what it does is = changes  "VIA SENATO" in to "Via senato" = but what i=20 need  is "Via Senato"
 
Anyoneeeeeee??
 
 
 
Shavonne Wijesinghe
----- Original Message -----
From:=20 Bart Degryse
Sent: Monday, February 19, 2007 = 4:25=20 PM
Subject: Re: [SQL] Uppercase = and=20 Lowercase

Replace && by ||

>>> "Shavonne = Marietta=20 Wijesinghe" <shavonne.marietta@studiof= orm.it>=20 2007-02-19 16:22 >>>
Hello
 
In my PostgreSQL database i have = records inserted=20 in Uppercase.
For example: VIA SENATO
 
What i want is to change them to "Via = Senato".=20 Ofcourse i'm looking for a automatico way. I wrote this code = update registro1 set pa_indirizzo =3D=20 upper(substr(pa_indirizzo, 1, 1)) && = lower(substr(pa_indirizzo, 2,=20 length(pa_indirizzo) - 1)) But it = doesn't=20 work.
 
When i run only update registro1 set pa_indirizzo =3D = upper(substr(pa_indirizzo, 1, 1))=20 It gets me the first letter and = when i=20 run
update registro1 set = pa_indirizzo =3D=20 lower(substr(pa_indirizzo, 2, length(pa_indirizzo) - 1)) I get from the second letter to the last. = But when i=20 join them them don't work..
 
 
Anyone got any idea??
 
Thanks
 
Shavonne=20 Wijesinghe
------=_NextPart_000_0024_01C75444.8BC52190--