Re: Capitalizing First Letter of Every Word - Mailing list pgsql-general

From Rob Arnold
Subject Re: Capitalizing First Letter of Every Word
Date
Msg-id 005801c0fea4$1bfd7160$4901010a@canrion.net
Whole thread Raw
In response to Capitalizing First Letter of Every Word  ("Brian T. Allen" <brian@gzmarketing.com>)
List pgsql-general
select initcap(product_name) from products
 
initcap() is available in 7.1, maybe earlier versions too.
 
--rob
 
----- Original Message -----
Sent: Tuesday, June 26, 2001 6:56 PM
Subject: Capitalizing First Letter of Every Word

Hi *,
 
I have a database of products, and the client entered everything in all caps.  While there is no intelligent way to do change everything to what it should be, changing the first letter of every word to uppercase and everything else to lowercase would at least look better (except for the occasional acroynym).
 
Is there a function to do that? I think I can handle everything except breaking the whole column up into individual words...   I know how I would do it in PHP (and I may have to resort to that), but would prefer to do it in the db.
 
Any suggestions?
 
Thanks,
Brian

pgsql-general by date:

Previous
From: Martijn van Oosterhout
Date:
Subject: Re: Why is NULL not indexable?
Next
From: Martijn van Oosterhout
Date:
Subject: Re: Why is NULL not indexable?