Hi,

A function like initcap in other databases and programming languages in 
mysql would be
much desired in such situations.

You may try this ugly code.

select ltrim(replace(replace(replace...(concat(' ',lower(strcolumn)),' a',' 
A'),' b',' B'  ),' c',' C'), ...,' z',' Z'))  from tablename;


Anvar.

At 11:10 PM 25/04/2002 -0500, you wrote:
>I have no problem with figuring out how to punctuate a field that contains a
>single word, but how would I code a SQL query to proper-case each word in a
>field when the field contains, for instance, a title? I want to convert,
>"HOW NOW BROWN COW" to, "How Now Brown Cow"
>
>Thanks,
>Doug
>
>
>---------------------------------------------------------------------
>Before posting, please check:
>    http://www.mysql.com/manual.php  (the manual)
>    http://lists.mysql.com/          (the list archive)
>
>To request this thread, e-mail <[EMAIL PROTECTED]>
>To unsubscribe, e-mail 
><[EMAIL PROTECTED]>
>Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php


---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to