X-Original-To: pgsql-general-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by postgresql.org (Postfix) with ESMTP id B5D899DCDAC; Mon, 13 Mar 2006 18:37:37 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 78031-06; Mon, 13 Mar 2006 18:37:39 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey- X-Greylist: from auto-whitelisted by SQLgrey- Received: from perseverance.encs.concordia.ca (perseverance-96.encs.concordia.ca [132.205.96.94]) by postgresql.org (Postfix) with ESMTP id 5EE5A9DCD90; Mon, 13 Mar 2006 18:37:35 -0400 (AST) Received: from [132.205.47.205] (IDENT:emilu@curacao.encs.concordia.ca [132.205.47.205]) by perseverance.encs.concordia.ca (8.12.11/8.12.11) with ESMTP id k2DMbbRs000452; Mon, 13 Mar 2006 17:37:37 -0500 Message-ID: <4415F430.7060503@encs.concordia.ca> Date: Mon, 13 Mar 2006 17:37:36 -0500 From: Emi Lu Reply-To: emilu@encs.concordia.ca User-Agent: Mozilla Thunderbird 1.0.7 (X11/20050923) X-Accept-Language: en-us, en MIME-Version: 1.0 To: emilu@encs.concordia.ca CC: pgsql-general@postgresql.org, pgsql-sql@postgresql.org Subject: Re: Update value to "the first character is capital and References: <4415F2C0.3040707@encs.concordia.ca> In-Reply-To: <4415F2C0.3040707@encs.concordia.ca> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.43 on perseverance.encs.concordia.ca at 2006/03/13 17:37:37 EST X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, score=0.137 required=5 tests=[AWL=0.137] X-Spam-Score: 0.137 X-Spam-Level: X-Archive-Number: 200603/520 X-Sequence-Number: 92385 I got the answer from the docs. |initcap|(text) thanks anyway, Ying > Hello all, > > Does anyone have available plpgsql codes to update all capital letters > in a column to "the first character is capital and the rest is small" ? > > For example, in tableA(id, description) > 001, 'ZHANG ZHE XIN' > => 'Zhang Zhe Xin' > 002, 'LIU, WEI-HUAI' > => 'Liu, Wei-Huai' > 003, 'GU & WEI. NAN (CE SHI) & TOMMORROW' => 'Gu & Wei. Nan > (Ce Shi) & Tommorrow' > > Thanks a lot! > Ying > > > ---------------------------(end of broadcast)--------------------------- > TIP 5: don't forget to increase your free space map settings