Received: from localhost (maia-3.hub.org [200.46.204.184]) by postgresql.org (Postfix) with ESMTP id 7C1929FB32C for ; Mon, 19 Feb 2007 11:49:01 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.184]) (amavisd-new, port 10024) with ESMTP id 13443-09 for ; Mon, 19 Feb 2007 11:48:47 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey-1.7.4 Received: from interscan.indicator.com (mail.indicator.be [193.121.199.3]) by postgresql.org (Postfix) with ESMTP id A43D39FB86F for ; Mon, 19 Feb 2007 11:48:53 -0400 (AST) Received: from webaccess.indicator.be ([10.100.1.7]) by interscan.indicator.com with InterScan Message Security Suite; Mon, 19 Feb 2007 16:36:41 +0100 Received: from DOMEXT-MTA by webaccess.indicator.bewith Novell_GroupWise; Mon, 19 Feb 2007 16:48:51 +0100 Message-Id: <45D9D4E9.A3DD.0030.0@indicator.be> X-Mailer: Novell GroupWise Internet Agent 7.0.1 Date: Mon, 19 Feb 2007 16:48:41 +0100 From: "Bart Degryse" To: Subject: Re: Uppercase and Lowercase References: <001001c75439$b7749b50$1102a8c0@dream><45D9CF8C.A3DD.0030.0@indi cator.be> <002701c7543c$2a888730$1102a8c0@dream> In-Reply-To: <002701c7543c$2a888730$1102a8c0@dream> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="=__PartFBDF6AC9.0__=" X-imss-version: 2.046 X-imss-result: Passed X-imss-approveListMatch: *@indicator.be X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.272 tagged_above=0 required=5 tests=BAYES_50, FORGED_RCVD_HELO, HTML_50_60, HTML_MESSAGE, UNPARSEABLE_RELAY X-Spam-Level: X-Archive-Number: 200702/197 X-Sequence-Number: 27531 --=__PartFBDF6AC9.0__= Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Of course it does. That's what you ask your query to do. You only used the = wrong operator for string concatenation, which is why it didn't seem to = work. But your query will not do this for each word in a field. For that = you need a function or regular expressions. I suggest you try select initcap(pa_indirizzo) from .. Please always reply to pgsql-sql@postgresql.org and not to the senders = email address. >>> "Shavonne Marietta Wijesinghe" = 2007-02-19 16:39 >>> Hey thanks Bart. it worked ;)=20 =20 but sadly what it does is changes "VIA SENATO" in to "Via senato" but = what i need is "Via Senato" =20 Anyoneeeeeee?? =20 =20 =20 Shavonne Wijesinghe ----- Original Message -----=20 From: Bart Degryse ( mailto:Bart.Degryse@indicator.be )=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 =20 In my PostgreSQL database i have records inserted in Uppercase.=20 For example: VIA SENATO =20 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. =20 When i run only update registro1 set pa_indirizzo =3D upper(substr(pa_indir= izzo, 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.. =20 =20 Anyone got any idea?? =20 Thanks =20 Shavonne Wijesinghe --=__PartFBDF6AC9.0__= Content-Type: text/html; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Content-Description: HTML
Of course it does. That's what you ask your query to do. You only = used the wrong operator for string concatenation, which is why it didn't = seem to work. But your query will not do this for each word in a field. = For that you need a function or regular expressions. I suggest you = try
select initcap(pa_indirizzo) from ..

Please always reply to pgsql-sql@postgresql.org and not to the senders email address.

>>> "Shavonne Marietta Wijesinghe" <shavonne.marietta@= studioform.it> 2007-02-19 16:39 >>>
Hey thanks Bart. it worked ;)
 
but sadly what it does is changes  "VIA SENATO" in to "Via se= nato" but what i need  is "Via Senato"
 
Anyoneeeeeee??
 
 
 
Shavonne Wijesinghe
----- Original Message -----
= From: Bart Degryse
Sent: Monday, February 19, 2007 = 4:25 PM
Subject: Re: [SQL] Uppercase and = Lowercase

Replace && by ||

>>> "Shavonne = Marietta Wijesinghe" <shavonne.marietta@studioform.it> 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 code = update registro1 set pa_indirizz= o =3D upper(substr(pa_indirizzo, 1, 1)) && lower(substr(pa_indirizz= o, 2, length(pa_indirizzo) - 1)) But it = doesn't work.
 
When i run only update registro1 set pa_indirizzo =3D upper(substr(pa_indi= rizzo, 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
--=__PartFBDF6AC9.0__=--