Re: Capitalizing First Letter of Every Word

From: "Rob Arnold" <rob(at)cabrion(dot)com>
To: "Brian T(dot) Allen" <brian(at)gzmarketing(dot)com>, <pgsql-general(at)postgresql(dot)org>
Subject: Re: Capitalizing First Letter of Every Word
Date: 2001-06-27 00:56:16
Message-ID: 005801c0fea4$1bfd7160$4901010a@canrion.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

select initcap(product_name) from products

initcap() is available in 7.1, maybe earlier versions too.

--rob

----- Original Message -----
From: Brian T. Allen
To: pgsql-general(at)postgresql(dot)org
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

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Martijn van Oosterhout 2001-06-27 01:19:55 Re: Why is NULL not indexable?
Previous Message Martijn van Oosterhout 2001-06-27 00:06:23 Re: Why is NULL not indexable?